Class AstValidator

java.lang.Object
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.
  • Constructor Details

  • Method Details

    • 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)