JavaScriptParser Class
Represents a parser for the JavaScript language.
public class JavaScriptParser : LLParserBase, ILLParser, IParser, IKeyedObject
- Inheritance:
- object ParserBase LLParserBase object
- Implements:
- ILLParser IParser IKeyedObject
Constructors
JavaScriptParser(Grammar?)
Represents a parser for the JavaScript language.
public JavaScriptParser(Grammar? grammar = null)
| Parameter | Type | Description |
|---|---|---|
| grammar | Grammar | The optional Grammar instance to use, with a new JavaScriptGrammar being created if none is specified. |
Methods
CreateParseData(IParseRequest, IParserState)
Creates an IParseData for the specified IParserState, after the parse operation has completed.
protected override IParseData? CreateParseData(IParseRequest request, IParserState state)
| Parameter | Type | Description |
|---|---|---|
| request | IParseRequest | The IParseRequest that contains data about the requested parsing operation. |
| state | IParserState | The IParserState to examine. |
Returns
CreateTokenReader(ITextBufferReader)
Creates an ITokenReader that is used by the parser to read through tokens.
public override ITokenReader CreateTokenReader(ITextBufferReader reader)
| Parameter | Type | Description |
|---|---|---|
| reader | ITextBufferReader | The ITextBufferReader that provides access to the text buffer. |
Returns
InitializeParserState(IParserState, IParseRequest)
Initializes the IParserState, allowing its CustomData property to be configured based on data from the IParseRequest, immediately prior to the parse operation running.
protected override void InitializeParserState(IParserState state, IParseRequest request)
| Parameter | Type | Description |
|---|---|---|
| state | IParserState | The IParserState to initialize. |
| request | IParseRequest | The IParseRequest that initiated the parse operation. |
Inherited Members
- LLParserBase.CreateParserState(ITokenReader, IAstNodeBuilder, ITextSnapshot)
- LLParserBase.InitializeParseData(LLParseData, IParserState)
- LLParserBase.Parse(IParseRequest)
- LLParserBase.Grammar
- ParserBase.Key
- object.GetType()
- object.MemberwiseClone()
- object.ToString()
- object.Equals(object)
- object.Equals(object, object)
- object.ReferenceEquals(object, object)
- object.GetHashCode()