language-ecmascript-0.9: JavaScript analysis tools

Safe HaskellSafe-Infered

Language.ECMAScript3.Parser

Description

Parser for ECMAScript 3.

Synopsis

Documentation

parseSource

Arguments

:: Stream s Identity t 
=> Parsec s [String] a

The parser to use

-> SourceName

Name of the source file

-> s

the stream to parse, usually a String

-> Either ParseError a 

Parse from a stream; same as parse

parseScriptFromStringSource

Arguments

:: String

source file name

-> String

JavaScript source to parse

-> Either ParseError (JavaScript SourcePos) 

Parse a JavaScript program from a string

parseJavaScriptFromFileSource

Arguments

:: MonadIO m 
=> String

file name

-> m [Statement SourcePos] 

Read a JavaScript program from file an parse it into a list of statements

parseStringSource

Arguments

:: String

JavaScript source

-> [Statement SourcePos] 

Parse a JavaScript source string into a list of statements