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