language-javascript-0.4.1: Parser for JavaScript

Language.JavaScript.Parser.Parser

Contents

Synopsis

Parsing

parseSource

Arguments

:: String

The input stream (Javascript source code).

-> String

The name of the Javascript source (filename or input device).

-> Either ParseError JSNode

An error or maybe the abstract syntax tree (AST) of zero or more Javascript statements, plus comments.

Parse one compound statement, or a sequence of simple statements. Generally used for interactive input, such as from the command line of an interpreter. Return comments in addition to the parsed statements.

Parsing expressions

parseUsingSource

Arguments

:: P JSNode 
-> String

The input stream (Javascript source code).

-> String

The name of the Javascript source (filename or input device).

-> Either ParseError JSNode

An error or maybe the abstract syntax tree (AST) of zero or more Javascript statements, plus comments.

Parse one compound statement, or a sequence of simple statements. Generally used for interactive input, such as from the command line of an interpreter. Return comments in addition to the parsed statements.