11 instantiations of Lexer
Microsoft.CodeAnalysis.CSharp (11)
Parser\LanguageParser_InterpolatedString.cs (3)
73
using var tempLexer = new
Lexer
(SourceText.From(originalText), this.Options, allowPreprocessorDirectives: false);
374
using var tempLexer = new
Lexer
(SourceText.From(expressionText), options, allowPreprocessorDirectives: false, interpolationFollowedByColon: interpolation.HasColon);
465
using var tempLexer = new
Lexer
(SourceText.From(fakeString), this.Options, allowPreprocessorDirectives: false);
Syntax\CSharpSyntaxTree.cs (2)
505
using var lexer = new InternalSyntax.
Lexer
(text, options);
571
using var lexer = new InternalSyntax.
Lexer
(newText, this.Options);
Syntax\SyntaxFactory.cs (6)
1592
using (var lexer = new InternalSyntax.
Lexer
(MakeSourceText(text, offset), options))
1603
using (var lexer = new InternalSyntax.
Lexer
(MakeSourceText(text, offset), CSharpParseOptions.Default))
1640
using (var lexer = new InternalSyntax.
Lexer
(MakeSourceText(text, offset), CSharpParseOptions.Default))
1658
using (var lexer = new InternalSyntax.
Lexer
(MakeSourceText(text, offset), options ?? CSharpParseOptions.Default))
1684
return new SyntaxTokenParser(new InternalSyntax.
Lexer
(sourceText, options ?? CSharpParseOptions.Default));
1918
return new InternalSyntax.
Lexer
(
65 references to Lexer
Microsoft.CodeAnalysis.CSharp (65)
Parser\Blender.cs (3)
17
private readonly
Lexer
_lexer;
35
public Blender(
Lexer
lexer, CSharp.CSharpSyntaxNode oldTree, IEnumerable<TextChangeRange> changes)
84
Lexer
lexer,
Parser\Blender.Cursor.cs (1)
148
var greenToken =
Lexer
.RescanInterpolatedString((InterpolatedStringExpressionSyntax)node.Green);
Parser\Blender.Reader.cs (1)
17
private readonly
Lexer
_lexer;
Parser\DirectiveParser.cs (1)
20
internal DirectiveParser(
Lexer
lexer)
Parser\DocumentationCommentParser.cs (1)
40
internal DocumentationCommentParser(
Lexer
lexer)
Parser\LanguageParser.cs (1)
38
Lexer
lexer,
Parser\LanguageParser_InterpolatedString.cs (29)
49
var interpolations = ArrayBuilder<
Lexer
.Interpolation>.GetInstance();
55
var needsDedentation = kind ==
Lexer
.InterpolatedStringKind.MultiLineRaw && error == null;
71
void rescanInterpolation(out
Lexer
.InterpolatedStringKind kind, out SyntaxDiagnosticInfo? error, out Range openQuoteRange, ArrayBuilder<
Lexer
.Interpolation> interpolations, out Range closeQuoteRange)
73
using
var
tempLexer = new Lexer(SourceText.From(originalText), this.Options, allowPreprocessorDirectives: false);
74
var info = default(
Lexer
.TokenInfo);
84
Lexer
.InterpolatedStringKind.Normal => SyntaxKind.InterpolatedStringStartToken,
85
Lexer
.InterpolatedStringKind.Verbatim => SyntaxKind.InterpolatedVerbatimStringStartToken,
86
Lexer
.InterpolatedStringKind.SingleLineRaw => SyntaxKind.InterpolatedSingleLineRawStringStartToken,
87
Lexer
.InterpolatedStringKind.MultiLineRaw => SyntaxKind.InterpolatedMultiLineRawStringStartToken,
245
Lexer
.InterpolatedStringKind.Normal => SyntaxKind.InterpolatedStringEndToken,
246
Lexer
.InterpolatedStringKind.Verbatim => SyntaxKind.InterpolatedStringEndToken,
247
Lexer
.InterpolatedStringKind.SingleLineRaw => SyntaxKind.InterpolatedRawStringEndToken,
248
Lexer
.InterpolatedStringKind.MultiLineRaw => SyntaxKind.InterpolatedRawStringEndToken,
279
Lexer
.Interpolation interpolation)
308
currentLineMessage =
Lexer
.CharToString(currentLineChar);
309
indentationLineMessage =
Lexer
.CharToString(indentationLineChar);
363
Lexer
.Interpolation interpolation,
364
Lexer
.InterpolatedStringKind kind,
374
using
var
tempLexer = new Lexer(SourceText.From(expressionText), options, allowPreprocessorDirectives: false, interpolationFollowedByColon: interpolation.HasColon);
393
Lexer
.Interpolation interpolation,
394
Lexer
.InterpolatedStringKind kind,
452
private SyntaxToken MakeInterpolatedStringTextToken(
Lexer
.InterpolatedStringKind kind, string text)
456
if (kind is
Lexer
.InterpolatedStringKind.SingleLineRaw or
Lexer
.InterpolatedStringKind.MultiLineRaw)
459
Debug.Assert(kind is
Lexer
.InterpolatedStringKind.Normal or
Lexer
.InterpolatedStringKind.Verbatim);
463
var prefix = kind is
Lexer
.InterpolatedStringKind.Verbatim ? "@\"" : "\"";
465
using
var
tempLexer = new Lexer(SourceText.From(fakeString), this.Options, allowPreprocessorDirectives: false);
Parser\Lexer_StringLiteral.cs (2)
341
private readonly
Lexer
_lexer;
349
public InterpolatedStringScanner(
Lexer
lexer)
Parser\QuickScanner.cs (1)
253
private static SyntaxToken CreateQuickToken(
Lexer
lexer)
Parser\SyntaxParser.cs (3)
21
protected readonly
Lexer
lexer;
52
Lexer
lexer,
142
var
lexer = this.lexer;
Syntax\CSharpSyntaxTree.cs (2)
505
using
var
lexer = new InternalSyntax.Lexer(text, options);
571
using
var
lexer = new InternalSyntax.Lexer(newText, this.Options);
Syntax\SyntaxFactory.cs (17)
1592
using (
var
lexer = new InternalSyntax.Lexer(MakeSourceText(text, offset), options))
1603
using (
var
lexer = new InternalSyntax.Lexer(MakeSourceText(text, offset), CSharpParseOptions.Default))
1640
using (
var
lexer = new InternalSyntax.Lexer(MakeSourceText(text, offset), CSharpParseOptions.Default))
1658
using (
var
lexer = new InternalSyntax.Lexer(MakeSourceText(text, offset), options ?? CSharpParseOptions.Default))
1692
using (
var
lexer = MakeLexer(text, offset))
1716
using (
var
lexer = MakeLexer(text, offset, (CSharpParseOptions?)options))
1735
using (
var
lexer = MakeLexer(text, offset, (CSharpParseOptions?)options))
1754
using (
var
lexer = MakeLexer(text, offset, (CSharpParseOptions?)options))
1774
using (
var
lexer = MakeLexer(text, offset, (CSharpParseOptions?)options))
1799
using (
var
lexer = MakeLexer(text, offset, options))
1817
using (
var
lexer = MakeLexer(text, offset, (CSharpParseOptions?)options))
1836
using (
var
lexer = MakeLexer(text, offset, (CSharpParseOptions?)options))
1855
using (
var
lexer = MakeLexer(text, offset, (CSharpParseOptions?)options))
1874
using (
var
lexer = MakeLexer(text, offset, (CSharpParseOptions?)options))
1893
using
var
lexer = MakeLexer(text, offset, (CSharpParseOptions?)options);
1916
private static InternalSyntax.
Lexer
MakeLexer(string text, int offset, CSharpParseOptions? options = null)
1923
private static InternalSyntax.LanguageParser MakeParser(InternalSyntax.
Lexer
lexer)
Syntax\SyntaxTokenParser.cs (3)
27
private InternalSyntax.
Lexer
_lexer;
29
internal SyntaxTokenParser(InternalSyntax.
Lexer
lexer)
36
var
lexer = Interlocked.CompareExchange(ref _lexer!, null, _lexer);