C# Класс Jurassic.Library.JSONLexer

Converts JSON text into a series of tokens.
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
JSONLexer ( ScriptEngine engine, TextReader reader ) : System

Creates a JSONLexer instance with the given source of text.

NextToken ( ) : Jurassic.Compiler.Token

Reads the next token from the reader.

Приватные методы

Метод Описание
IsHexDigit ( int c ) : bool

Determines if the given character is valid in a hexidecimal number.

IsIdentifierChar ( int c ) : bool

Determines if the given character is valid as a character of an identifier.

IsNumericLiteralStartChar ( int c ) : bool

Determines if the given character is valid as the first character of a numeric literal.

IsWhiteSpace ( int c ) : bool

Determines if the given character is whitespace or a line terminator.

ReadHexNumber ( int digitCount ) : char

Reads a hexidecimal number with the given number of digits and turns it into a character.

ReadInteger ( double initialValue, int &digitsRead ) : double

Reads an integer value.

ReadKeyword ( int firstChar ) : Jurassic.Compiler.Token

Reads an keyword token.

ReadNumericLiteral ( int firstChar ) : Jurassic.Compiler.Token

Reads a numeric literal token.

ReadStringLiteral ( int firstChar ) : Jurassic.Compiler.Token

Reads a string literal.

ReadWhiteSpace ( ) : Jurassic.Compiler.Token

Reads past whitespace.

Описание методов

JSONLexer() публичный Метод

Creates a JSONLexer instance with the given source of text.
public JSONLexer ( ScriptEngine engine, TextReader reader ) : System
engine ScriptEngine The script engine used to create error objects.
reader TextReader A reader that will supply the JSON source text.
Результат System

NextToken() публичный Метод

Reads the next token from the reader.
public NextToken ( ) : Jurassic.Compiler.Token
Результат Jurassic.Compiler.Token