Package com.google.javascript.jscomp

# 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.

## Nested Class Summary

Nested Classes
Modifier and Type
Class
Description
`static interface`
`AstValidator.ViolationHandler`

## Constructor Summary

Constructors
Constructor
Description
`AstValidator()`
`AstValidator(AstValidator.ViolationHandler handler)`

## Method Summary

Modifier and Type
Method
Description
`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 Details

### AstValidator

public AstValidator(AstValidator.ViolationHandler handler)

### AstValidator

public AstValidator()

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