All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.shapesecurity.shift.es2017.validator.README.md Maven / Gradle / Ivy

Shift AST Validator
===========================

## Description

The `Validator.validate` function validates an AST and returns a list of validation errors.

## Usage

```java
import com.shapesecurity.shift.parser.Parser;
import com.shapesecurity.shift.ast.Program;
import com.shapesecurity.shift.scope.ScopeAnalyzer;
import com.shapesecurity.shift.js.valid.Validator;
import com.shapesecurity.shift.js.valid.ValidationError;

String source = "a; b;";
Script script = new Parser(source).parse();
List  errs = Validator.validate(script);
```




© 2015 - 2024 Weber Informatics LLC | Privacy Policy