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

com.shapesecurity.shift.parser.README.md Maven / Gradle / Ivy

There is a newer version: 2.2.0
Show newest version
Shift AST Parser
================

## Description

The `Parser.parseScript` function parses a String of ECMAScript program text using `Script` as the goal symbol, and either returns a `Script` node or throws a `ParseError`. Similarly, the `Parser.parseModule` function parses a String of ECMAScript program text using `Module` as the goal symbol, and either returns a `Module` node or throws a `ParseError`.

## Usage

```java
import com.shapesecurity.shift.parser.Parser;

String js = "a; b;";
Script p = Parser.parseScript(js);
Module m = Parser.parseModule(js);
```




© 2015 - 2024 Weber Informatics LLC | Privacy Policy