Class JSONLexer
Performs lexical analysis on source supplied in JSON syntax. This class supports lazy analysis that happens gradually as result tokens are consumed through IEnumerable interface. NOTE: Although called JSON, this is really a JSON superset implementation that includes extra features: comments, directives, verbatim strings(start with $), ' or " string escapes, unquoted object key names
Inheritance
System.Object
JSONLexer
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: Azos.CodeAnalysis.JSON
Assembly: Azos.dll
Syntax
public sealed class JSONLexer : Lexer<JSONToken>, IConfigurable, ILexer, ICodeProcessor, IEnumerable<JSONToken>, IEnumerable
Constructors
JSONLexer(IAnalysisContext, SourceCodeRef, ISourceText, MessageList, Boolean)
Declaration
public JSONLexer(IAnalysisContext context, SourceCodeRef srcRef, ISourceText source, MessageList messages = null, bool throwErrors = false)
Parameters
Type | Name | Description |
---|---|---|
IAnalysisContext | context | |
SourceCodeRef | srcRef | |
ISourceText | source | |
MessageList | messages | |
System.Boolean | throwErrors |
JSONLexer(ISourceText, MessageList, Boolean)
Declaration
public JSONLexer(ISourceText source, MessageList messages = null, bool throwErrors = false)
Parameters
Type | Name | Description |
---|---|---|
ISourceText | source | |
MessageList | messages | |
System.Boolean | throwErrors |
Properties
Language
Declaration
public override Language Language { get; }
Property Value
Type | Description |
---|---|
Language |
Overrides
Methods
DoLexingChunk()
Declaration
protected override bool DoLexingChunk()
Returns
Type | Description |
---|---|
System.Boolean |
Overrides
Azos.CodeAnalysis.Lexer<Azos.CodeAnalysis.JSON.JSONToken>.DoLexingChunk()
MessageCodeToString(Int32)
Declaration
public override string MessageCodeToString(int code)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | code |
Returns
Type | Description |
---|---|
System.String |
Overrides
Implements
System.Collections.Generic.IEnumerable<T>
System.Collections.IEnumerable