142 references to LexerMode
Microsoft.CodeAnalysis.CSharp (142)
Parser\Blender.cs (7)
33private readonly LexerMode _newLexerDrivenMode; 91LexerMode newLexerDrivenMode) 103_newLexerDrivenMode = newLexerDrivenMode & (LexerMode.MaskXmlDocCommentLocation | LexerMode.MaskXmlDocCommentStyle); 176public BlendedNode ReadNode(LexerMode mode) 181public BlendedNode ReadToken(LexerMode mode) 186private BlendedNode ReadNodeOrToken(LexerMode mode, bool asToken)
Parser\Blender.Reader.cs (7)
24private LexerMode _newLexerDrivenMode; 38internal BlendedNode ReadNodeOrToken(LexerMode mode, bool asToken) 138private BlendedNode ReadNewToken(LexerMode mode) 163private SyntaxToken LexNewToken(LexerMode mode) 170if (mode >= LexerMode.XmlDocComment) 177_newLexerDrivenMode = mode & (LexerMode.MaskXmlDocCommentLocation | LexerMode.MaskXmlDocCommentStyle);
Parser\DirectiveParser.cs (1)
21: base(lexer, LexerMode.Directive, oldTree: null, changes: null, allowModeReset: false)
Parser\DocumentationCommentParser.cs (46)
41: base(lexer, LexerMode.None, oldTree: null, changes: null, allowModeReset: true) 45internal void ReInitialize(LexerMode modeflags) 48this.Mode = LexerMode.XmlDocComment | LexerMode.XmlDocCommentLocationStart | modeflags; 49_isDelimited = (modeflags & LexerMode.XmlDocCommentStyleDelimited) != 0; 52private LexerMode SetMode(LexerMode mode) 54var tmp = this.Mode; 55this.Mode = mode | (tmp & (LexerMode.MaskXmlDocCommentLocation | LexerMode.MaskXmlDocCommentStyle)); 59private void ResetMode(LexerMode mode) 103var saveMode = this.SetMode(LexerMode.XmlCDataSectionText); 205var saveMode = this.SetMode(LexerMode.XmlElementTag); 221this.SetMode(LexerMode.XmlDocComment); 244this.SetMode(LexerMode.XmlElementTag); 530this.SetMode(LexerMode.XmlCharacter); 559var saveMode = this.SetMode(quoteKind == SyntaxKind.SingleQuoteToken 560? LexerMode.XmlCrefQuote 561: LexerMode.XmlCrefDoubleQuote); 577var saveMode = this.SetMode(quoteKind == SyntaxKind.SingleQuoteToken 578? LexerMode.XmlNameQuote 579: LexerMode.XmlNameDoubleQuote); 602var saveMode = this.SetMode(quoteKind == SyntaxKind.SingleQuoteToken 603? LexerMode.XmlAttributeTextQuote 604: LexerMode.XmlAttributeTextDoubleQuote); 723var saveMode = this.SetMode(LexerMode.XmlCommentText); 750var saveMode = this.SetMode(LexerMode.XmlCDataSectionText); 766var saveMode = this.SetMode(LexerMode.XmlElementTag); //this mode accepts names 772this.SetMode(LexerMode.XmlProcessingInstructionText); //this mode consumes text 1521return (this.Mode & LexerMode.XmlCrefQuote) == LexerMode.XmlCrefQuote; 1523return (this.Mode & LexerMode.XmlCrefDoubleQuote) == LexerMode.XmlCrefDoubleQuote; 1545switch (this.Mode & (LexerMode.XmlCrefDoubleQuote | LexerMode.XmlCrefQuote)) 1547case LexerMode.XmlCrefQuote: 1548case LexerMode.XmlCrefDoubleQuote: 1589return (this.Mode & LexerMode.XmlNameQuote) == LexerMode.XmlNameQuote; 1591return (this.Mode & LexerMode.XmlNameDoubleQuote) == LexerMode.XmlNameDoubleQuote;
Parser\LanguageParser.cs (2)
41LexerMode lexerMode = LexerMode.Syntax,
Parser\LanguageParser_InterpolatedString.cs (2)
466var mode = LexerMode.Syntax;
Parser\Lexer.cs (68)
77private LexerMode _mode; 176private static LexerMode ModeOf(LexerMode mode) 178return mode & LexerMode.MaskLexMode; 181private bool ModeIs(LexerMode mode) 186private static XmlDocCommentLocation LocationOf(LexerMode mode) 188return (XmlDocCommentLocation)((int)(mode & LexerMode.MaskXmlDocCommentLocation) >> 16); 198_mode &= ~LexerMode.MaskXmlDocCommentLocation; 199_mode |= (LexerMode)((int)location << 16); 202private static XmlDocCommentStyle StyleOf(LexerMode mode) 204return (XmlDocCommentStyle)((int)(mode & LexerMode.MaskXmlDocCommentStyle) >> 20); 218case LexerMode.XmlDocComment: 219case LexerMode.XmlElementTag: 220case LexerMode.XmlAttributeTextQuote: 221case LexerMode.XmlAttributeTextDoubleQuote: 222case LexerMode.XmlCrefQuote: 223case LexerMode.XmlCrefDoubleQuote: 224case LexerMode.XmlNameQuote: 225case LexerMode.XmlNameDoubleQuote: 226case LexerMode.XmlCDataSectionText: 227case LexerMode.XmlCommentText: 228case LexerMode.XmlProcessingInstructionText: 229case LexerMode.XmlCharacter: 237public SyntaxToken Lex(ref LexerMode mode) 248public SyntaxToken Lex(LexerMode mode) 256case LexerMode.Syntax: 257case LexerMode.DebuggerSyntax: 259case LexerMode.Directive: 265case LexerMode.XmlDocComment: 267case LexerMode.XmlElementTag: 269case LexerMode.XmlAttributeTextQuote: 270case LexerMode.XmlAttributeTextDoubleQuote: 272case LexerMode.XmlCDataSectionText: 274case LexerMode.XmlCommentText: 276case LexerMode.XmlProcessingInstructionText: 278case LexerMode.XmlCrefQuote: 279case LexerMode.XmlCrefDoubleQuote: 281case LexerMode.XmlNameQuote: 282case LexerMode.XmlNameDoubleQuote: 285case LexerMode.XmlCharacter: 660if (this.ModeIs(LexerMode.DebuggerSyntax)) 929if (this.ModeIs(LexerMode.DebuggerSyntax) && TextWindow.PeekChar() == '#') 1343if ((_mode & LexerMode.MaskLexMode) == LexerMode.DebuggerSyntax) 1479if (!this.ModeIs(LexerMode.DebuggerSyntax) || _identLen > 0) 1505this.ModeIs(LexerMode.DebuggerSyntax) && 1540if (_identLen == 0 && this.ModeIs(LexerMode.DebuggerSyntax) && TextWindow.PeekChar(1) == '>') 1850if (this.ModeIs(LexerMode.Directive)) 2431var saveMode = _mode; 2801var saveMode = _mode; 2805? LexerMode.XmlDocCommentStyleSingleLine 2806: LexerMode.XmlDocCommentStyleDelimited); 3401if (this.ModeIs(LexerMode.XmlAttributeTextDoubleQuote)) 3411if (this.ModeIs(LexerMode.XmlAttributeTextQuote)) 3467if (this.ModeIs(LexerMode.XmlAttributeTextDoubleQuote)) 3476if (this.ModeIs(LexerMode.XmlAttributeTextQuote)) 3624if (this.ModeIs(LexerMode.XmlCrefDoubleQuote) || this.ModeIs(LexerMode.XmlNameDoubleQuote)) 3633if (this.ModeIs(LexerMode.XmlCrefQuote) || this.ModeIs(LexerMode.XmlNameQuote)) 3938switch (_mode & LexerMode.MaskLexMode) 3940case LexerMode.XmlCrefQuote: 3941case LexerMode.XmlCrefDoubleQuote: 3942case LexerMode.XmlNameQuote: 3943case LexerMode.XmlNameDoubleQuote: 3959switch (_mode & LexerMode.MaskLexMode) 3961case LexerMode.XmlNameQuote: 3962case LexerMode.XmlNameDoubleQuote:
Parser\SyntaxParser.cs (4)
26private LexerMode _mode; 53LexerMode mode, 143var mode = _mode; 229protected LexerMode Mode
Parser\SyntaxParser.ResetPoint.cs (2)
14internal readonly LexerMode Mode; 18internal ResetPoint(int resetCount, LexerMode mode, int position, GreenNode prevTokenTrailingTrivia)
Syntax\SyntaxFactory.cs (2)
1642return new SyntaxToken(lexer.Lex(InternalSyntax.LexerMode.Syntax)); 1663var token = lexer.Lex(InternalSyntax.LexerMode.Syntax);
Syntax\SyntaxTokenParser.cs (1)
55var token = _lexer.Lex(InternalSyntax.LexerMode.Syntax);