package
0.5.1
Repository: https://github.com/robertkrimen/otto.git
Documentation: pkg.go.dev

# Functions

NewParser returns a new Parser.
ParseFile parses the source code of a single JavaScript/ECMAScript source file and returns the corresponding ast.Program node.
ParseFileWithSourceMap parses the sourcemap returning the resulting Program.
ParseFunction parses a given parameter list and body as a function and returns the corresponding ast.FunctionLiteral node.
ReadSource reads code from src if not nil, otherwise reads from filename.
ReadSourceMap reads the source map from src if not nil, otherwise is a noop.
TransformRegExp transforms a JavaScript pattern into a Go "regexp" pattern.

# Constants

IgnoreRegExpErrors ignores RegExp compatibility errors (allow backtracking).
StoreComments stores the comments from source to the comments map.

# Structs

An Error represents a parsing error.

# Interfaces

Parser is implemented by types which can parse JavaScript Code.

# Type aliases

ErrorList is a list of *Errors.
A Mode value is a set of flags (or 0).