com.google.javascript.jscomp
Class AstValidator

java.lang.Object
  extended by com.google.javascript.jscomp.AstValidator
All Implemented Interfaces:
CompilerPass

public class AstValidator
extends Object
implements CompilerPass

This class walks the AST and validates that the structure is correct.


Nested Class Summary
static interface AstValidator.ViolationHandler
           
 
Constructor Summary
AstValidator()
           
AstValidator(AstValidator.ViolationHandler handler)
           
 
Method Summary
 void process(Node externs, Node root)
          Process the JS with root node root.
 void validateCodeRoot(Node n)
           
 void validateExpression(Node n)
           
 void validateRoot(Node n)
           
 void validateScript(Node n)
           
 void validateStatement(Node n)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AstValidator

public AstValidator(AstValidator.ViolationHandler handler)

AstValidator

public AstValidator()
Method Detail

process

public void process(Node externs,
                    Node root)
Description copied from interface: CompilerPass
Process the JS with root node root. Can modify the contents of each Node tree

Specified by:
process in interface CompilerPass
Parameters:
externs - Top of external JS tree
root - Top of JS tree

validateRoot

public void validateRoot(Node n)

validateCodeRoot

public void validateCodeRoot(Node n)

validateScript

public void validateScript(Node n)

validateStatement

public void validateStatement(Node n)

validateExpression

public void validateExpression(Node n)