JavaScriptLexer Class
Represents a JavaScript lexer (lexical analyzer) implementation.
public class JavaScriptLexer : MergableLexerBase, IMergableLexer, ILexer, IKeyedObject
    - Inheritance:
 - object MergableLexerBase object
 
- Implements:
 - IMergableLexer ILexer IKeyedObject
 
Constructors
JavaScriptLexer()
Initializes a new instance of the JavaScriptLexer class.
public JavaScriptLexer()
        
  
   
   
   
   
  
        
        
        
        
  
        Properties
LexicalStates
Gets the collection of lexical states used by this lexer.
public ILexicalStateCollection LexicalStates { get; }
        
  
   
   
   
              Property Value
- ILexicalStateCollection:
 The collection of lexical states used by this lexer.
Methods
GetAllLexicalStateTransitions()
Returns a collection containing all ILexicalStateTransition objects within the lexer.
public override IEnumerable<ILexicalStateTransition> GetAllLexicalStateTransitions()
        
  
   
              Returns
- IEnumerable<ILexicalStateTransition>:
 A collection containing all ILexicalStateTransition objects within the lexer.
Remarks
This method allows consumers to see which language transitions can be made within the lexer.
GetNextToken(ITextBufferReader, ILexicalState)
Performs a lex to return the next MergableLexerResult from a ITextBufferReader and seeks past it if there is a match.
public override MergableLexerResult GetNextToken(ITextBufferReader reader, ILexicalState lexicalState)
        
  
              | Parameter | Type | Description | 
|---|---|---|
| reader | ITextBufferReader | An ITextBufferReader that is reading a text source.  | 
                    
| lexicalState | ILexicalState | The ILexicalState that specifies the current state.  | 
                    
Returns
- MergableLexerResult:
 A MergableLexerResult indicating the lexer result.
IsIdentifierPartCharacter(char)
Returns whether the specified character is an identifier part character.
public static bool IsIdentifierPartCharacter(char ch)
        
  
              | Parameter | Type | Description | 
|---|---|---|
| ch | char | The character to examine.  | 
                    
Returns
- bool:
 trueif the specified character is an identifier part character; otherwise,false.
IsIdentifierStartCharacter(char)
Returns whether the specified character is an identifier start character.
public static bool IsIdentifierStartCharacter(char ch)
        
  
              | Parameter | Type | Description | 
|---|---|---|
| ch | char | The character to examine.  | 
                    
Returns
- bool:
 trueif the specified character is an identifier start character; otherwise,false.
Inherited Members
- MergableLexerBase.CreateChangeBatch()
 - MergableLexerBase.CreateDocumentEndToken(int, TextPosition, ILexicalState)
 - MergableLexerBase.CreateToken(int, int, TextPosition, TextPosition, MergableLexerFlags, ILexicalState, IMergableTokenLexerData)
 - MergableLexerBase.GetDefaultToken(ITextBufferReader, ILexicalState)
 - MergableLexerBase.GetIncrementalParseRange(TextSnapshotRange)
 - MergableLexerBase.OnChanged(EventArgs)
 - MergableLexerBase.Parse(TextSnapshotRange, ILexerTarget)
 - MergableLexerBase.DefaultLexicalStateCore
 - MergableLexerBase.KeyCore
 - MergableLexerBase.LexicalStateIdProviderCore
 - MergableLexerBase.TokenIdProviderCore
 - MergableLexerBase.Changed
 - object.GetType()
 - object.MemberwiseClone()
 - object.ToString()
 - object.Equals(object)
 - object.Equals(object, object)
 - object.ReferenceEquals(object, object)
 - object.GetHashCode()