Safe Haskell | None |
---|
Language.ECMAScript3.Parser
Description
Parser for ECMAScript 3.
- parse :: Stream s Identity t => Parsec s [String] a -> SourceName -> s -> Either ParseError a
- parseScriptFromString :: String -> String -> Either ParseError (JavaScript SourcePos)
- parseJavaScriptFromFile :: MonadIO m => String -> m [Statement SourcePos]
- parseScript :: CharParser (JavaScript SourcePos)
- parseExpression :: ExpressionParser
- parseString :: String -> [Statement SourcePos]
- type ParsedStatement = Statement SourcePos
- type ParsedExpression = Expression SourcePos
- parseSimpleExpr' :: ParsecT String ParserState Identity ParsedExpression
- parseBlockStmt :: StatementParser
- parseStatement :: StatementParser
- type StatementParser = CharParser ParsedStatement
- type ExpressionParser = CharParser ParsedExpression
- assignExpr :: ExpressionParser
Documentation
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 |
-> Either ParseError a |
Parse from a stream; same as parse
Arguments
:: String | source file name |
-> String | JavaScript source to parse |
-> Either ParseError (JavaScript SourcePos) |
Parse a JavaScript program from a string
Read a JavaScript program from file an parse it into a list of statements
parseScript :: CharParser (JavaScript SourcePos)Source
Parse a JavaScript source string into a list of statements
parseSimpleExpr' :: ParsecT String ParserState Identity ParsedExpressionSource
type StatementParser = CharParser ParsedStatementSource
type ExpressionParser = CharParser ParsedExpressionSource