Méthode | Description | |
---|---|---|
JSONParser ( ScriptEngine engine, |
Creates a JSONParser instance with the given lexer supplying the tokens.
|
|
Parse ( ) : object |
Parses the JSON text (optionally applying the reviver function) and returns the resulting value.
|
Méthode | Description | |
---|---|---|
Consume ( ) : void |
Discards the current token and reads the next one.
|
|
Expect ( Jurassic.Compiler.Token token ) : void |
Indicates that the next token is identical to the given one. Throws an exception if this is not the case. Consumes the token.
|
|
ExpectIdentifier ( ) : string |
Indicates that the next token should be an identifier. Throws an exception if this is not the case. Consumes the token.
|
|
ParseArrayLiteral ( ) : |
Parses an array literal (e.g. "[1, 2]").
|
|
ParseObjectLiteral ( ) : |
Parses an object literal (e.g. "{a: 5}").
|
|
ParseValue ( ) : object |
Parses a value.
|
public JSONParser ( ScriptEngine engine, |
||
engine | ScriptEngine | The associated script engine. |
lexer | The lexical analyser that provides the tokens. | |
Résultat | System |