Module: lib/parser

Classes

BareScriptParserError

Methods

(static) parseExpression(exprText, lineNumberopt, scriptNameopt, nullable, arrayLiteralsopt) → {Object}

Parse a BareScript expression

Parameters:
Name Type Attributes Default Description
exprText string

The expression text

lineNumber number <optional>
1

The script line number

scriptName string <optional>
<nullable>
null

The script name

arrayLiterals boolean <optional>
false

If True, allow parsing of array literals

Source:
Throws:
Returns:
Type
Object

(static) parseScript(scriptText, startLineNumberopt, scriptNameopt, nullable) → {Object}

Parse a BareScript script

Parameters:
Name Type Attributes Default Description
scriptText string | Array.<string>

The script text

startLineNumber number <optional>
1

The script's starting line number

scriptName string <optional>
<nullable>
null

The script name

Source:
Throws:
Returns:
Type
Object