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