diff --git a/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/Cohost/CohostDocumentSpellCheckEndpointTest.cs b/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/Cohost/CohostDocumentSpellCheckEndpointTest.cs
index e993d979323..dc69e6658e7 100644
--- a/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/Cohost/CohostDocumentSpellCheckEndpointTest.cs
+++ b/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/Cohost/CohostDocumentSpellCheckEndpointTest.cs
@@ -55,9 +55,40 @@ Eat more chickin.
await VerifySpellCheckableRangesAsync(input);
}
- private async Task VerifySpellCheckableRangesAsync(TestCode input)
+ [Fact]
+ public async Task ComponentAttributes()
+ {
+ await VerifySpellCheckableRangesAsync(
+ input: """
+
@DateTime.Now
+ } +@DateTime.Now
+ } +@{var [|abc|] = 123;}
+ """; + + await VerifyProximityExpressionsAsync(input, ["__builder", "this"]); + } + + [Fact] + public async Task ResolveProximityExpressionsAsync_InsideExplicitStatement() + { + var input = """ + + +@{var$$ [|abc|] = 123;}
+ """; + + await VerifyProximityExpressionsAsync(input, ["__builder", "this"]); + } + [Fact] public async Task ResolveProximityExpressionsAsync_ImplicitExpression() { @@ -174,6 +208,59 @@ public async Task ResolveBreakpointRangeAsync_OutsideImplicitExpression() await VerifyBreakpointRangeAsync(input); } + [Fact] + public async Task ResolveBreakpointRangeAsync_OutsideExplicitStatement() + { + var input = """ + + + $$@{ [|var abc = 123;|] }
+ """; + + await VerifyBreakpointRangeAsync(input); + } + + [Fact] + public async Task ResolveBreakpointRangeAsync_OutsideExplicitStatement_NoCSharpOnLine() + { + var input = """ + + + $$@{ + var abc = 123; + }
+ """; + + await VerifyBreakpointRangeAsync(input); + } + + [Fact] + public async Task ResolveBreakpointRangeAsync_InsideExplicitStatement_NoCSharpOnLine() + { + var input = """ + + +@{ + $$ + var abc = 123; + }
+ """; + + await VerifyBreakpointRangeAsync(input); + } + + [Fact] + public async Task ResolveBreakpointRangeAsync_OutsideExplicitStatement_InvalidLocation() + { + var input = """ + + + $$@{ var abc; }
+ """; + + await VerifyBreakpointRangeAsync(input); + } + [Fact] public async Task ResolveBreakpointRangeAsync_ComponentStartTag() { diff --git a/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/TestFiles/SemanticTokens/Expressions.txt b/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/TestFiles/SemanticTokens/Expressions.txt new file mode 100644 index 00000000000..44e48e76d48 --- /dev/null +++ b/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/TestFiles/SemanticTokens/Expressions.txt @@ -0,0 +1,21 @@ +Line Δ, Char Δ, Length, Type, Modifier(s), Text +0 0 1 razorTransition [] [@] +0 1 8 struct name [] [DateTime] +0 8 1 operator [] [.] +0 1 3 property name [static] [Now] +2 0 1 razorTransition [] [@] +0 1 1 razorTransition [] [(] +0 1 7 string [] ["hello"] +0 8 1 operator [] [+] +0 2 1 string [] ["] +0 1 2 string - escape character [] [\\] +0 2 2 string [] [n"] +0 3 1 operator [] [+] +0 2 7 string [] ["world"] +0 8 1 operator [] [+] +0 2 11 class name [static] [Environment] +0 11 1 operator [] [.] +0 1 7 property name [static] [NewLine] +0 8 1 operator [] [+] +0 2 14 string [] ["how are you?"] +0 14 1 razorTransition [] [)] diff --git a/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/TestFiles/SemanticTokens/Expressions_misc_file.txt b/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/TestFiles/SemanticTokens/Expressions_misc_file.txt new file mode 100644 index 00000000000..44e48e76d48 --- /dev/null +++ b/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/TestFiles/SemanticTokens/Expressions_misc_file.txt @@ -0,0 +1,21 @@ +Line Δ, Char Δ, Length, Type, Modifier(s), Text +0 0 1 razorTransition [] [@] +0 1 8 struct name [] [DateTime] +0 8 1 operator [] [.] +0 1 3 property name [static] [Now] +2 0 1 razorTransition [] [@] +0 1 1 razorTransition [] [(] +0 1 7 string [] ["hello"] +0 8 1 operator [] [+] +0 2 1 string [] ["] +0 1 2 string - escape character [] [\\] +0 2 2 string [] [n"] +0 3 1 operator [] [+] +0 2 7 string [] ["world"] +0 8 1 operator [] [+] +0 2 11 class name [static] [Environment] +0 11 1 operator [] [.] +0 1 7 property name [static] [NewLine] +0 8 1 operator [] [+] +0 2 14 string [] ["how are you?"] +0 14 1 razorTransition [] [)] diff --git a/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/TestFiles/SemanticTokens/Expressions_with_background.txt b/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/TestFiles/SemanticTokens/Expressions_with_background.txt new file mode 100644 index 00000000000..734b8029813 --- /dev/null +++ b/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/TestFiles/SemanticTokens/Expressions_with_background.txt @@ -0,0 +1,29 @@ +Line Δ, Char Δ, Length, Type, Modifier(s), Text +0 0 1 razorTransition [razorCode] [@] +0 1 8 struct name [razorCode] [DateTime] +0 8 1 operator [razorCode] [.] +0 1 3 property name [static, razorCode] [Now] +2 0 1 razorTransition [razorCode] [@] +0 1 1 razorTransition [razorCode] [(] +0 1 7 string [razorCode] ["hello"] +0 7 1 markupTextLiteral [razorCode] [ ] +0 1 1 operator [razorCode] [+] +0 1 1 markupTextLiteral [razorCode] [ ] +0 1 1 string [razorCode] ["] +0 1 2 string - escape character [razorCode] [\\] +0 2 2 string [razorCode] [n"] +0 2 1 markupTextLiteral [razorCode] [ ] +0 1 1 operator [razorCode] [+] +0 1 1 markupTextLiteral [razorCode] [ ] +0 1 7 string [razorCode] ["world"] +0 7 1 markupTextLiteral [razorCode] [ ] +0 1 1 operator [razorCode] [+] +0 1 1 markupTextLiteral [razorCode] [ ] +0 1 11 class name [static, razorCode] [Environment] +0 11 1 operator [razorCode] [.] +0 1 7 property name [static, razorCode] [NewLine] +0 7 1 markupTextLiteral [razorCode] [ ] +0 1 1 operator [razorCode] [+] +0 1 1 markupTextLiteral [razorCode] [ ] +0 1 14 string [razorCode] ["how are you?"] +0 14 1 razorTransition [razorCode] [)] diff --git a/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/TestFiles/SemanticTokens/Expressions_with_background_misc_file.txt b/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/TestFiles/SemanticTokens/Expressions_with_background_misc_file.txt new file mode 100644 index 00000000000..734b8029813 --- /dev/null +++ b/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/TestFiles/SemanticTokens/Expressions_with_background_misc_file.txt @@ -0,0 +1,29 @@ +Line Δ, Char Δ, Length, Type, Modifier(s), Text +0 0 1 razorTransition [razorCode] [@] +0 1 8 struct name [razorCode] [DateTime] +0 8 1 operator [razorCode] [.] +0 1 3 property name [static, razorCode] [Now] +2 0 1 razorTransition [razorCode] [@] +0 1 1 razorTransition [razorCode] [(] +0 1 7 string [razorCode] ["hello"] +0 7 1 markupTextLiteral [razorCode] [ ] +0 1 1 operator [razorCode] [+] +0 1 1 markupTextLiteral [razorCode] [ ] +0 1 1 string [razorCode] ["] +0 1 2 string - escape character [razorCode] [\\] +0 2 2 string [razorCode] [n"] +0 2 1 markupTextLiteral [razorCode] [ ] +0 1 1 operator [razorCode] [+] +0 1 1 markupTextLiteral [razorCode] [ ] +0 1 7 string [razorCode] ["world"] +0 7 1 markupTextLiteral [razorCode] [ ] +0 1 1 operator [razorCode] [+] +0 1 1 markupTextLiteral [razorCode] [ ] +0 1 11 class name [static, razorCode] [Environment] +0 11 1 operator [razorCode] [.] +0 1 7 property name [static, razorCode] [NewLine] +0 7 1 markupTextLiteral [razorCode] [ ] +0 1 1 operator [razorCode] [+] +0 1 1 markupTextLiteral [razorCode] [ ] +0 1 14 string [razorCode] ["how are you?"] +0 14 1 razorTransition [razorCode] [)] diff --git a/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/TestFiles/SemanticTokens/GetSemanticTokens_CSharp_Static.txt b/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/TestFiles/SemanticTokens/GetSemanticTokens_CSharp_Static.txt new file mode 100644 index 00000000000..1f7a70bd6f5 --- /dev/null +++ b/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/TestFiles/SemanticTokens/GetSemanticTokens_CSharp_Static.txt @@ -0,0 +1,26 @@ +Line Δ, Char Δ, Length, Type, Modifier(s), Text +0 0 1 razorTransition [] [@] +0 1 5 keyword [] [using] +0 6 6 namespace name [] [System] +1 0 1 razorTransition [] [@] +0 1 4 razorDirective [] [code] +1 0 1 razorTransition [] [{] +1 4 7 keyword [] [private] +0 8 6 keyword [] [static] +0 7 4 keyword [] [bool] +0 5 9 field name [static] [_isStatic] +0 9 1 punctuation [] [;] +2 4 6 keyword [] [public] +0 7 4 keyword [] [void] +0 5 1 method name [] [M] +0 1 1 punctuation [] [(] +0 1 1 punctuation [] [)] +1 4 1 punctuation [] [{] +1 8 2 keyword - control [] [if] +0 3 1 punctuation [] [(] +0 1 9 field name [static] [_isStatic] +0 9 1 punctuation [] [)] +1 8 1 punctuation [] [{] +1 8 1 punctuation [] [}] +1 4 1 punctuation [] [}] +1 0 1 razorTransition [] [}] diff --git a/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/TestFiles/SemanticTokens/GetSemanticTokens_CSharp_Static_misc_file.txt b/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/TestFiles/SemanticTokens/GetSemanticTokens_CSharp_Static_misc_file.txt new file mode 100644 index 00000000000..1f7a70bd6f5 --- /dev/null +++ b/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/TestFiles/SemanticTokens/GetSemanticTokens_CSharp_Static_misc_file.txt @@ -0,0 +1,26 @@ +Line Δ, Char Δ, Length, Type, Modifier(s), Text +0 0 1 razorTransition [] [@] +0 1 5 keyword [] [using] +0 6 6 namespace name [] [System] +1 0 1 razorTransition [] [@] +0 1 4 razorDirective [] [code] +1 0 1 razorTransition [] [{] +1 4 7 keyword [] [private] +0 8 6 keyword [] [static] +0 7 4 keyword [] [bool] +0 5 9 field name [static] [_isStatic] +0 9 1 punctuation [] [;] +2 4 6 keyword [] [public] +0 7 4 keyword [] [void] +0 5 1 method name [] [M] +0 1 1 punctuation [] [(] +0 1 1 punctuation [] [)] +1 4 1 punctuation [] [{] +1 8 2 keyword - control [] [if] +0 3 1 punctuation [] [(] +0 1 9 field name [static] [_isStatic] +0 9 1 punctuation [] [)] +1 8 1 punctuation [] [{] +1 8 1 punctuation [] [}] +1 4 1 punctuation [] [}] +1 0 1 razorTransition [] [}] diff --git a/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/TestFiles/SemanticTokens/GetSemanticTokens_CSharp_Static_with_background.txt b/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/TestFiles/SemanticTokens/GetSemanticTokens_CSharp_Static_with_background.txt new file mode 100644 index 00000000000..f5507df10a8 --- /dev/null +++ b/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/TestFiles/SemanticTokens/GetSemanticTokens_CSharp_Static_with_background.txt @@ -0,0 +1,40 @@ +Line Δ, Char Δ, Length, Type, Modifier(s), Text +0 0 1 razorTransition [] [@] +0 1 5 keyword [razorCode] [using] +0 5 1 markupTextLiteral [razorCode] [ ] +0 1 6 namespace name [razorCode] [System] +1 0 1 razorTransition [] [@] +0 1 4 razorDirective [] [code] +1 0 1 razorTransition [] [{] +1 0 4 markupTextLiteral [razorCode] [ ] +0 4 7 keyword [razorCode] [private] +0 7 1 markupTextLiteral [razorCode] [ ] +0 1 6 keyword [razorCode] [static] +0 6 1 markupTextLiteral [razorCode] [ ] +0 1 4 keyword [razorCode] [bool] +0 4 1 markupTextLiteral [razorCode] [ ] +0 1 9 field name [static, razorCode] [_isStatic] +0 9 1 punctuation [razorCode] [;] +2 0 4 markupTextLiteral [razorCode] [ ] +0 4 6 keyword [razorCode] [public] +0 6 1 markupTextLiteral [razorCode] [ ] +0 1 4 keyword [razorCode] [void] +0 4 1 markupTextLiteral [razorCode] [ ] +0 1 1 method name [razorCode] [M] +0 1 1 punctuation [razorCode] [(] +0 1 1 punctuation [razorCode] [)] +1 0 4 markupTextLiteral [razorCode] [ ] +0 4 1 punctuation [razorCode] [{] +1 0 8 markupTextLiteral [razorCode] [ ] +0 8 2 keyword - control [razorCode] [if] +0 2 1 markupTextLiteral [razorCode] [ ] +0 1 1 punctuation [razorCode] [(] +0 1 9 field name [static, razorCode] [_isStatic] +0 9 1 punctuation [razorCode] [)] +1 0 8 markupTextLiteral [razorCode] [ ] +0 8 1 punctuation [razorCode] [{] +1 0 8 markupTextLiteral [razorCode] [ ] +0 8 1 punctuation [razorCode] [}] +1 0 4 markupTextLiteral [razorCode] [ ] +0 4 1 punctuation [razorCode] [}] +1 0 1 razorTransition [] [}] diff --git a/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/TestFiles/SemanticTokens/GetSemanticTokens_CSharp_Static_with_background_misc_file.txt b/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/TestFiles/SemanticTokens/GetSemanticTokens_CSharp_Static_with_background_misc_file.txt new file mode 100644 index 00000000000..f5507df10a8 --- /dev/null +++ b/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/TestFiles/SemanticTokens/GetSemanticTokens_CSharp_Static_with_background_misc_file.txt @@ -0,0 +1,40 @@ +Line Δ, Char Δ, Length, Type, Modifier(s), Text +0 0 1 razorTransition [] [@] +0 1 5 keyword [razorCode] [using] +0 5 1 markupTextLiteral [razorCode] [ ] +0 1 6 namespace name [razorCode] [System] +1 0 1 razorTransition [] [@] +0 1 4 razorDirective [] [code] +1 0 1 razorTransition [] [{] +1 0 4 markupTextLiteral [razorCode] [ ] +0 4 7 keyword [razorCode] [private] +0 7 1 markupTextLiteral [razorCode] [ ] +0 1 6 keyword [razorCode] [static] +0 6 1 markupTextLiteral [razorCode] [ ] +0 1 4 keyword [razorCode] [bool] +0 4 1 markupTextLiteral [razorCode] [ ] +0 1 9 field name [static, razorCode] [_isStatic] +0 9 1 punctuation [razorCode] [;] +2 0 4 markupTextLiteral [razorCode] [ ] +0 4 6 keyword [razorCode] [public] +0 6 1 markupTextLiteral [razorCode] [ ] +0 1 4 keyword [razorCode] [void] +0 4 1 markupTextLiteral [razorCode] [ ] +0 1 1 method name [razorCode] [M] +0 1 1 punctuation [razorCode] [(] +0 1 1 punctuation [razorCode] [)] +1 0 4 markupTextLiteral [razorCode] [ ] +0 4 1 punctuation [razorCode] [{] +1 0 8 markupTextLiteral [razorCode] [ ] +0 8 2 keyword - control [razorCode] [if] +0 2 1 markupTextLiteral [razorCode] [ ] +0 1 1 punctuation [razorCode] [(] +0 1 9 field name [static, razorCode] [_isStatic] +0 9 1 punctuation [razorCode] [)] +1 0 8 markupTextLiteral [razorCode] [ ] +0 8 1 punctuation [razorCode] [{] +1 0 8 markupTextLiteral [razorCode] [ ] +0 8 1 punctuation [razorCode] [}] +1 0 4 markupTextLiteral [razorCode] [ ] +0 4 1 punctuation [razorCode] [}] +1 0 1 razorTransition [] [}] diff --git a/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/TestFiles/SemanticTokens/GetSemanticTokens_Legacy_Model.txt b/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/TestFiles/SemanticTokens/GetSemanticTokens_Legacy_Model.txt new file mode 100644 index 00000000000..e830d034a27 --- /dev/null +++ b/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/TestFiles/SemanticTokens/GetSemanticTokens_Legacy_Model.txt @@ -0,0 +1,28 @@ +Line Δ, Char Δ, Length, Type, Modifier(s), Text +0 0 1 razorTransition [] [@] +0 1 5 keyword [] [using] +0 6 6 namespace name [] [System] +1 0 1 razorTransition [] [@] +0 1 5 razorDirective [] [model] +0 6 9 variable [] [SampleApp] +0 9 1 operator [] [.] +0 1 5 variable [] [Pages] +0 5 1 operator [] [.] +0 1 10 variable [] [ErrorModel] +2 0 1 markupTagDelimiter [] [<] +0 1 3 markupElement [] [div] +0 3 1 markupTagDelimiter [] [>] +2 4 1 razorTransition [] [@] +0 1 1 razorTransition [] [{] +1 8 1 razorTransition [] [@] +0 1 5 property name [] [Model] +0 5 1 operator [] [.] +0 1 8 variable [] [ToString] +0 8 1 punctuation [] [(] +0 1 1 punctuation [] [)] +0 1 1 punctuation [] [;] +1 4 1 razorTransition [] [}] +2 0 1 markupTagDelimiter [] [<] +0 1 1 markupTagDelimiter [] [/] +0 1 3 markupElement [] [div] +0 3 1 markupTagDelimiter [] [>] diff --git a/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/TestFiles/SemanticTokens/GetSemanticTokens_Legacy_Model_misc_file.txt b/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/TestFiles/SemanticTokens/GetSemanticTokens_Legacy_Model_misc_file.txt new file mode 100644 index 00000000000..68fbef584f4 --- /dev/null +++ b/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/TestFiles/SemanticTokens/GetSemanticTokens_Legacy_Model_misc_file.txt @@ -0,0 +1,28 @@ +Line Δ, Char Δ, Length, Type, Modifier(s), Text +0 0 1 razorTransition [] [@] +0 1 5 keyword [] [using] +0 6 6 namespace name [] [System] +1 0 1 razorTransition [] [@] +0 1 5 razorDirective [] [model] +0 6 9 variable [] [SampleApp] +0 9 1 operator [] [.] +0 1 5 variable [] [Pages] +0 5 1 operator [] [.] +0 1 10 variable [] [ErrorModel] +2 0 1 markupTagDelimiter [] [<] +0 1 3 markupElement [] [div] +0 3 1 markupTagDelimiter [] [>] +2 4 1 razorTransition [] [@] +0 1 1 razorTransition [] [{] +1 8 1 razorTransition [] [@] +0 1 5 variable [] [Model] +0 5 1 operator [] [.] +0 1 8 variable [] [ToString] +0 8 1 punctuation [] [(] +0 1 1 punctuation [] [)] +0 1 1 punctuation [] [;] +1 4 1 razorTransition [] [}] +2 0 1 markupTagDelimiter [] [<] +0 1 1 markupTagDelimiter [] [/] +0 1 3 markupElement [] [div] +0 3 1 markupTagDelimiter [] [>] diff --git a/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/TestFiles/SemanticTokens/GetSemanticTokens_Legacy_Model_with_background.txt b/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/TestFiles/SemanticTokens/GetSemanticTokens_Legacy_Model_with_background.txt new file mode 100644 index 00000000000..b4ce0bcab7c --- /dev/null +++ b/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/TestFiles/SemanticTokens/GetSemanticTokens_Legacy_Model_with_background.txt @@ -0,0 +1,29 @@ +Line Δ, Char Δ, Length, Type, Modifier(s), Text +0 0 1 razorTransition [] [@] +0 1 5 keyword [razorCode] [using] +0 5 1 markupTextLiteral [razorCode] [ ] +0 1 6 namespace name [razorCode] [System] +1 0 1 razorTransition [] [@] +0 1 5 razorDirective [] [model] +0 6 9 variable [razorCode] [SampleApp] +0 9 1 operator [razorCode] [.] +0 1 5 variable [razorCode] [Pages] +0 5 1 operator [razorCode] [.] +0 1 10 variable [razorCode] [ErrorModel] +2 0 1 markupTagDelimiter [] [<] +0 1 3 markupElement [] [div] +0 3 1 markupTagDelimiter [] [>] +2 4 1 razorTransition [razorCode] [@] +0 1 1 razorTransition [razorCode] [{] +1 8 1 razorTransition [razorCode] [@] +0 1 5 property name [razorCode] [Model] +0 5 1 operator [razorCode] [.] +0 1 8 variable [razorCode] [ToString] +0 8 1 punctuation [razorCode] [(] +0 1 1 punctuation [razorCode] [)] +0 1 1 punctuation [razorCode] [;] +1 4 1 razorTransition [razorCode] [}] +2 0 1 markupTagDelimiter [] [<] +0 1 1 markupTagDelimiter [] [/] +0 1 3 markupElement [] [div] +0 3 1 markupTagDelimiter [] [>] diff --git a/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/TestFiles/SemanticTokens/GetSemanticTokens_Legacy_Model_with_background_misc_file.txt b/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/TestFiles/SemanticTokens/GetSemanticTokens_Legacy_Model_with_background_misc_file.txt new file mode 100644 index 00000000000..2a53fba49c4 --- /dev/null +++ b/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/TestFiles/SemanticTokens/GetSemanticTokens_Legacy_Model_with_background_misc_file.txt @@ -0,0 +1,29 @@ +Line Δ, Char Δ, Length, Type, Modifier(s), Text +0 0 1 razorTransition [] [@] +0 1 5 keyword [razorCode] [using] +0 5 1 markupTextLiteral [razorCode] [ ] +0 1 6 namespace name [razorCode] [System] +1 0 1 razorTransition [] [@] +0 1 5 razorDirective [] [model] +0 6 9 variable [razorCode] [SampleApp] +0 9 1 operator [razorCode] [.] +0 1 5 variable [razorCode] [Pages] +0 5 1 operator [razorCode] [.] +0 1 10 variable [razorCode] [ErrorModel] +2 0 1 markupTagDelimiter [] [<] +0 1 3 markupElement [] [div] +0 3 1 markupTagDelimiter [] [>] +2 4 1 razorTransition [razorCode] [@] +0 1 1 razorTransition [razorCode] [{] +1 8 1 razorTransition [razorCode] [@] +0 1 5 variable [razorCode] [Model] +0 5 1 operator [razorCode] [.] +0 1 8 variable [razorCode] [ToString] +0 8 1 punctuation [razorCode] [(] +0 1 1 punctuation [razorCode] [)] +0 1 1 punctuation [razorCode] [;] +1 4 1 razorTransition [razorCode] [}] +2 0 1 markupTagDelimiter [] [<] +0 1 1 markupTagDelimiter [] [/] +0 1 3 markupElement [] [div] +0 3 1 markupTagDelimiter [] [>] diff --git a/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/TestFiles/SemanticTokens/GetSemanticTokens_Razor_CommentAsync.txt b/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/TestFiles/SemanticTokens/GetSemanticTokens_Razor_CommentAsync.txt new file mode 100644 index 00000000000..387010ee930 --- /dev/null +++ b/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/TestFiles/SemanticTokens/GetSemanticTokens_Razor_CommentAsync.txt @@ -0,0 +1,6 @@ +Line Δ, Char Δ, Length, Type, Modifier(s), Text +0 0 1 razorCommentTransition [] [@] +0 1 1 razorCommentStar [] [*] +0 1 11 razorComment [] [ A comment ] +0 11 1 razorCommentStar [] [*] +0 1 1 razorCommentTransition [] [@] diff --git a/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/TestFiles/SemanticTokens/GetSemanticTokens_Razor_CommentAsync_misc_file.txt b/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/TestFiles/SemanticTokens/GetSemanticTokens_Razor_CommentAsync_misc_file.txt new file mode 100644 index 00000000000..387010ee930 --- /dev/null +++ b/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/TestFiles/SemanticTokens/GetSemanticTokens_Razor_CommentAsync_misc_file.txt @@ -0,0 +1,6 @@ +Line Δ, Char Δ, Length, Type, Modifier(s), Text +0 0 1 razorCommentTransition [] [@] +0 1 1 razorCommentStar [] [*] +0 1 11 razorComment [] [ A comment ] +0 11 1 razorCommentStar [] [*] +0 1 1 razorCommentTransition [] [@] diff --git a/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/TestFiles/SemanticTokens/GetSemanticTokens_Razor_CommentAsync_with_background.txt b/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/TestFiles/SemanticTokens/GetSemanticTokens_Razor_CommentAsync_with_background.txt new file mode 100644 index 00000000000..387010ee930 --- /dev/null +++ b/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/TestFiles/SemanticTokens/GetSemanticTokens_Razor_CommentAsync_with_background.txt @@ -0,0 +1,6 @@ +Line Δ, Char Δ, Length, Type, Modifier(s), Text +0 0 1 razorCommentTransition [] [@] +0 1 1 razorCommentStar [] [*] +0 1 11 razorComment [] [ A comment ] +0 11 1 razorCommentStar [] [*] +0 1 1 razorCommentTransition [] [@] diff --git a/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/TestFiles/SemanticTokens/GetSemanticTokens_Razor_CommentAsync_with_background_misc_file.txt b/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/TestFiles/SemanticTokens/GetSemanticTokens_Razor_CommentAsync_with_background_misc_file.txt new file mode 100644 index 00000000000..387010ee930 --- /dev/null +++ b/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/TestFiles/SemanticTokens/GetSemanticTokens_Razor_CommentAsync_with_background_misc_file.txt @@ -0,0 +1,6 @@ +Line Δ, Char Δ, Length, Type, Modifier(s), Text +0 0 1 razorCommentTransition [] [@] +0 1 1 razorCommentStar [] [*] +0 1 11 razorComment [] [ A comment ] +0 11 1 razorCommentStar [] [*] +0 1 1 razorCommentTransition [] [@] diff --git a/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/TestFiles/SemanticTokens/GetSemanticTokens_Razor_MultiLineCommentAsync.txt b/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/TestFiles/SemanticTokens/GetSemanticTokens_Razor_MultiLineCommentAsync.txt new file mode 100644 index 00000000000..a60a8821ae3 --- /dev/null +++ b/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/TestFiles/SemanticTokens/GetSemanticTokens_Razor_MultiLineCommentAsync.txt @@ -0,0 +1,7 @@ +Line Δ, Char Δ, Length, Type, Modifier(s), Text +0 0 1 razorCommentTransition [] [@] +0 1 1 razorCommentStar [] [*] +0 1 5 razorComment [] [stuff] +1 0 7 razorComment [] [things ] +0 7 1 razorCommentStar [] [*] +0 1 1 razorCommentTransition [] [@] diff --git a/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/TestFiles/SemanticTokens/GetSemanticTokens_Razor_MultiLineCommentAsync_misc_file.txt b/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/TestFiles/SemanticTokens/GetSemanticTokens_Razor_MultiLineCommentAsync_misc_file.txt new file mode 100644 index 00000000000..a60a8821ae3 --- /dev/null +++ b/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/TestFiles/SemanticTokens/GetSemanticTokens_Razor_MultiLineCommentAsync_misc_file.txt @@ -0,0 +1,7 @@ +Line Δ, Char Δ, Length, Type, Modifier(s), Text +0 0 1 razorCommentTransition [] [@] +0 1 1 razorCommentStar [] [*] +0 1 5 razorComment [] [stuff] +1 0 7 razorComment [] [things ] +0 7 1 razorCommentStar [] [*] +0 1 1 razorCommentTransition [] [@] diff --git a/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/TestFiles/SemanticTokens/GetSemanticTokens_Razor_MultiLineCommentAsync_with_background.txt b/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/TestFiles/SemanticTokens/GetSemanticTokens_Razor_MultiLineCommentAsync_with_background.txt new file mode 100644 index 00000000000..a60a8821ae3 --- /dev/null +++ b/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/TestFiles/SemanticTokens/GetSemanticTokens_Razor_MultiLineCommentAsync_with_background.txt @@ -0,0 +1,7 @@ +Line Δ, Char Δ, Length, Type, Modifier(s), Text +0 0 1 razorCommentTransition [] [@] +0 1 1 razorCommentStar [] [*] +0 1 5 razorComment [] [stuff] +1 0 7 razorComment [] [things ] +0 7 1 razorCommentStar [] [*] +0 1 1 razorCommentTransition [] [@] diff --git a/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/TestFiles/SemanticTokens/GetSemanticTokens_Razor_MultiLineCommentAsync_with_background_misc_file.txt b/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/TestFiles/SemanticTokens/GetSemanticTokens_Razor_MultiLineCommentAsync_with_background_misc_file.txt new file mode 100644 index 00000000000..a60a8821ae3 --- /dev/null +++ b/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/TestFiles/SemanticTokens/GetSemanticTokens_Razor_MultiLineCommentAsync_with_background_misc_file.txt @@ -0,0 +1,7 @@ +Line Δ, Char Δ, Length, Type, Modifier(s), Text +0 0 1 razorCommentTransition [] [@] +0 1 1 razorCommentStar [] [*] +0 1 5 razorComment [] [stuff] +1 0 7 razorComment [] [things ] +0 7 1 razorCommentStar [] [*] +0 1 1 razorCommentTransition [] [@] diff --git a/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/TestFiles/SemanticTokens/GetSemanticTokens_Razor_MultiLineCommentMidlineAsync.txt b/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/TestFiles/SemanticTokens/GetSemanticTokens_Razor_MultiLineCommentMidlineAsync.txt new file mode 100644 index 00000000000..31196b3e573 --- /dev/null +++ b/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/TestFiles/SemanticTokens/GetSemanticTokens_Razor_MultiLineCommentMidlineAsync.txt @@ -0,0 +1,12 @@ +Line Δ, Char Δ, Length, Type, Modifier(s), Text +0 0 1 markupTagDelimiter [] [<] +0 1 1 markupElement [] [a] +0 2 1 markupTagDelimiter [] [/] +0 1 1 markupTagDelimiter [] [>] +0 1 1 razorCommentTransition [] [@] +0 1 1 razorCommentStar [] [*] +0 1 4 razorComment [] [ kdl] +1 0 3 razorComment [] [skd] +1 0 3 razorComment [] [slf] +0 3 1 razorCommentStar [] [*] +0 1 1 razorCommentTransition [] [@] diff --git a/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/TestFiles/SemanticTokens/GetSemanticTokens_Razor_MultiLineCommentMidlineAsync_misc_file.txt b/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/TestFiles/SemanticTokens/GetSemanticTokens_Razor_MultiLineCommentMidlineAsync_misc_file.txt new file mode 100644 index 00000000000..31196b3e573 --- /dev/null +++ b/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/TestFiles/SemanticTokens/GetSemanticTokens_Razor_MultiLineCommentMidlineAsync_misc_file.txt @@ -0,0 +1,12 @@ +Line Δ, Char Δ, Length, Type, Modifier(s), Text +0 0 1 markupTagDelimiter [] [<] +0 1 1 markupElement [] [a] +0 2 1 markupTagDelimiter [] [/] +0 1 1 markupTagDelimiter [] [>] +0 1 1 razorCommentTransition [] [@] +0 1 1 razorCommentStar [] [*] +0 1 4 razorComment [] [ kdl] +1 0 3 razorComment [] [skd] +1 0 3 razorComment [] [slf] +0 3 1 razorCommentStar [] [*] +0 1 1 razorCommentTransition [] [@] diff --git a/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/TestFiles/SemanticTokens/GetSemanticTokens_Razor_MultiLineCommentMidlineAsync_with_background.txt b/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/TestFiles/SemanticTokens/GetSemanticTokens_Razor_MultiLineCommentMidlineAsync_with_background.txt new file mode 100644 index 00000000000..31196b3e573 --- /dev/null +++ b/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/TestFiles/SemanticTokens/GetSemanticTokens_Razor_MultiLineCommentMidlineAsync_with_background.txt @@ -0,0 +1,12 @@ +Line Δ, Char Δ, Length, Type, Modifier(s), Text +0 0 1 markupTagDelimiter [] [<] +0 1 1 markupElement [] [a] +0 2 1 markupTagDelimiter [] [/] +0 1 1 markupTagDelimiter [] [>] +0 1 1 razorCommentTransition [] [@] +0 1 1 razorCommentStar [] [*] +0 1 4 razorComment [] [ kdl] +1 0 3 razorComment [] [skd] +1 0 3 razorComment [] [slf] +0 3 1 razorCommentStar [] [*] +0 1 1 razorCommentTransition [] [@] diff --git a/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/TestFiles/SemanticTokens/GetSemanticTokens_Razor_MultiLineCommentMidlineAsync_with_background_misc_file.txt b/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/TestFiles/SemanticTokens/GetSemanticTokens_Razor_MultiLineCommentMidlineAsync_with_background_misc_file.txt new file mode 100644 index 00000000000..31196b3e573 --- /dev/null +++ b/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/TestFiles/SemanticTokens/GetSemanticTokens_Razor_MultiLineCommentMidlineAsync_with_background_misc_file.txt @@ -0,0 +1,12 @@ +Line Δ, Char Δ, Length, Type, Modifier(s), Text +0 0 1 markupTagDelimiter [] [<] +0 1 1 markupElement [] [a] +0 2 1 markupTagDelimiter [] [/] +0 1 1 markupTagDelimiter [] [>] +0 1 1 razorCommentTransition [] [@] +0 1 1 razorCommentStar [] [*] +0 1 4 razorComment [] [ kdl] +1 0 3 razorComment [] [skd] +1 0 3 razorComment [] [slf] +0 3 1 razorCommentStar [] [*] +0 1 1 razorCommentTransition [] [@] diff --git a/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/TestFiles/SemanticTokens/GetSemanticTokens_Razor_MultiLineCommentWithBlankLines.txt b/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/TestFiles/SemanticTokens/GetSemanticTokens_Razor_MultiLineCommentWithBlankLines.txt new file mode 100644 index 00000000000..8c8488c5abc --- /dev/null +++ b/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/TestFiles/SemanticTokens/GetSemanticTokens_Razor_MultiLineCommentWithBlankLines.txt @@ -0,0 +1,10 @@ +Line Δ, Char Δ, Length, Type, Modifier(s), Text +0 0 1 razorCommentTransition [] [@] +0 1 1 razorCommentStar [] [*] +0 1 4 razorComment [] [ kdl] +2 0 3 razorComment [] [skd] +1 0 4 razorComment [] [ ] +1 0 19 razorComment [] [ sdfasdfasdf] +1 0 3 razorComment [] [slf] +0 3 1 razorCommentStar [] [*] +0 1 1 razorCommentTransition [] [@] diff --git a/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/TestFiles/SemanticTokens/GetSemanticTokens_Razor_MultiLineCommentWithBlankLines_LF.txt b/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/TestFiles/SemanticTokens/GetSemanticTokens_Razor_MultiLineCommentWithBlankLines_LF.txt new file mode 100644 index 00000000000..8c8488c5abc --- /dev/null +++ b/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/TestFiles/SemanticTokens/GetSemanticTokens_Razor_MultiLineCommentWithBlankLines_LF.txt @@ -0,0 +1,10 @@ +Line Δ, Char Δ, Length, Type, Modifier(s), Text +0 0 1 razorCommentTransition [] [@] +0 1 1 razorCommentStar [] [*] +0 1 4 razorComment [] [ kdl] +2 0 3 razorComment [] [skd] +1 0 4 razorComment [] [ ] +1 0 19 razorComment [] [ sdfasdfasdf] +1 0 3 razorComment [] [slf] +0 3 1 razorCommentStar [] [*] +0 1 1 razorCommentTransition [] [@] diff --git a/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/TestFiles/SemanticTokens/GetSemanticTokens_Razor_MultiLineCommentWithBlankLines_LF_misc_file.txt b/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/TestFiles/SemanticTokens/GetSemanticTokens_Razor_MultiLineCommentWithBlankLines_LF_misc_file.txt new file mode 100644 index 00000000000..8c8488c5abc --- /dev/null +++ b/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/TestFiles/SemanticTokens/GetSemanticTokens_Razor_MultiLineCommentWithBlankLines_LF_misc_file.txt @@ -0,0 +1,10 @@ +Line Δ, Char Δ, Length, Type, Modifier(s), Text +0 0 1 razorCommentTransition [] [@] +0 1 1 razorCommentStar [] [*] +0 1 4 razorComment [] [ kdl] +2 0 3 razorComment [] [skd] +1 0 4 razorComment [] [ ] +1 0 19 razorComment [] [ sdfasdfasdf] +1 0 3 razorComment [] [slf] +0 3 1 razorCommentStar [] [*] +0 1 1 razorCommentTransition [] [@] diff --git a/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/TestFiles/SemanticTokens/GetSemanticTokens_Razor_MultiLineCommentWithBlankLines_LF_with_background.txt b/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/TestFiles/SemanticTokens/GetSemanticTokens_Razor_MultiLineCommentWithBlankLines_LF_with_background.txt new file mode 100644 index 00000000000..8c8488c5abc --- /dev/null +++ b/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/TestFiles/SemanticTokens/GetSemanticTokens_Razor_MultiLineCommentWithBlankLines_LF_with_background.txt @@ -0,0 +1,10 @@ +Line Δ, Char Δ, Length, Type, Modifier(s), Text +0 0 1 razorCommentTransition [] [@] +0 1 1 razorCommentStar [] [*] +0 1 4 razorComment [] [ kdl] +2 0 3 razorComment [] [skd] +1 0 4 razorComment [] [ ] +1 0 19 razorComment [] [ sdfasdfasdf] +1 0 3 razorComment [] [slf] +0 3 1 razorCommentStar [] [*] +0 1 1 razorCommentTransition [] [@] diff --git a/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/TestFiles/SemanticTokens/GetSemanticTokens_Razor_MultiLineCommentWithBlankLines_LF_with_background_misc_file.txt b/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/TestFiles/SemanticTokens/GetSemanticTokens_Razor_MultiLineCommentWithBlankLines_LF_with_background_misc_file.txt new file mode 100644 index 00000000000..8c8488c5abc --- /dev/null +++ b/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/TestFiles/SemanticTokens/GetSemanticTokens_Razor_MultiLineCommentWithBlankLines_LF_with_background_misc_file.txt @@ -0,0 +1,10 @@ +Line Δ, Char Δ, Length, Type, Modifier(s), Text +0 0 1 razorCommentTransition [] [@] +0 1 1 razorCommentStar [] [*] +0 1 4 razorComment [] [ kdl] +2 0 3 razorComment [] [skd] +1 0 4 razorComment [] [ ] +1 0 19 razorComment [] [ sdfasdfasdf] +1 0 3 razorComment [] [slf] +0 3 1 razorCommentStar [] [*] +0 1 1 razorCommentTransition [] [@] diff --git a/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/TestFiles/SemanticTokens/GetSemanticTokens_Razor_MultiLineCommentWithBlankLines_misc_file.txt b/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/TestFiles/SemanticTokens/GetSemanticTokens_Razor_MultiLineCommentWithBlankLines_misc_file.txt new file mode 100644 index 00000000000..8c8488c5abc --- /dev/null +++ b/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/TestFiles/SemanticTokens/GetSemanticTokens_Razor_MultiLineCommentWithBlankLines_misc_file.txt @@ -0,0 +1,10 @@ +Line Δ, Char Δ, Length, Type, Modifier(s), Text +0 0 1 razorCommentTransition [] [@] +0 1 1 razorCommentStar [] [*] +0 1 4 razorComment [] [ kdl] +2 0 3 razorComment [] [skd] +1 0 4 razorComment [] [ ] +1 0 19 razorComment [] [ sdfasdfasdf] +1 0 3 razorComment [] [slf] +0 3 1 razorCommentStar [] [*] +0 1 1 razorCommentTransition [] [@] diff --git a/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/TestFiles/SemanticTokens/GetSemanticTokens_Razor_MultiLineCommentWithBlankLines_with_background.txt b/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/TestFiles/SemanticTokens/GetSemanticTokens_Razor_MultiLineCommentWithBlankLines_with_background.txt new file mode 100644 index 00000000000..8c8488c5abc --- /dev/null +++ b/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/TestFiles/SemanticTokens/GetSemanticTokens_Razor_MultiLineCommentWithBlankLines_with_background.txt @@ -0,0 +1,10 @@ +Line Δ, Char Δ, Length, Type, Modifier(s), Text +0 0 1 razorCommentTransition [] [@] +0 1 1 razorCommentStar [] [*] +0 1 4 razorComment [] [ kdl] +2 0 3 razorComment [] [skd] +1 0 4 razorComment [] [ ] +1 0 19 razorComment [] [ sdfasdfasdf] +1 0 3 razorComment [] [slf] +0 3 1 razorCommentStar [] [*] +0 1 1 razorCommentTransition [] [@] diff --git a/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/TestFiles/SemanticTokens/GetSemanticTokens_Razor_MultiLineCommentWithBlankLines_with_background_misc_file.txt b/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/TestFiles/SemanticTokens/GetSemanticTokens_Razor_MultiLineCommentWithBlankLines_with_background_misc_file.txt new file mode 100644 index 00000000000..8c8488c5abc --- /dev/null +++ b/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/TestFiles/SemanticTokens/GetSemanticTokens_Razor_MultiLineCommentWithBlankLines_with_background_misc_file.txt @@ -0,0 +1,10 @@ +Line Δ, Char Δ, Length, Type, Modifier(s), Text +0 0 1 razorCommentTransition [] [@] +0 1 1 razorCommentStar [] [*] +0 1 4 razorComment [] [ kdl] +2 0 3 razorComment [] [skd] +1 0 4 razorComment [] [ ] +1 0 19 razorComment [] [ sdfasdfasdf] +1 0 3 razorComment [] [slf] +0 3 1 razorCommentStar [] [*] +0 1 1 razorCommentTransition [] [@] diff --git a/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/TestFiles/SemanticTokens/GetSemanticTokens_Razor_NestedTextDirectives.txt b/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/TestFiles/SemanticTokens/GetSemanticTokens_Razor_NestedTextDirectives.txt new file mode 100644 index 00000000000..84c1364073b --- /dev/null +++ b/src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/TestFiles/SemanticTokens/GetSemanticTokens_Razor_NestedTextDirectives.txt @@ -0,0 +1,55 @@ +Line Δ, Char Δ, Length, Type, Modifier(s), Text +0 0 1 razorTransition [] [@] +0 1 5 keyword [] [using] +0 6 6 namespace name [] [System] +1 0 1 razorTransition [] [@] +0 1 9 razorDirective [] [functions] +0 10 1 razorTransition [] [{] +1 4 7 keyword [] [private] +0 8 4 keyword [] [void] +0 5 14 method name [] [BidsByShipment] +0 14 1 punctuation [] [(] +0 1 6 keyword [] [string] +0 7 11 parameter name [] [generatedId] +0 11 1 punctuation [] [,] +0 2 3 keyword [] [int] +0 4 4 parameter name [] [bids] +0 4 1 punctuation [] [)] +1 4 1 punctuation [] [{] +1 8 2 keyword - control [] [if] +0 3 1 punctuation [] [(] +0 1 4 parameter name [] [bids] +0 5 1 operator [] [>] +0 2 1 number [] [0] +0 1 1 punctuation [] [)] +1 8 1 punctuation [] [{] +1 12 1 markupTagDelimiter [] [<] +0 1 1 markupElement [] [a] +0 2 5 markupAttribute [] [class] +0 5 1 markupOperator [] [=] +0 1 1 markupAttributeQuote [] ["] +0 1 1 markupAttributeQuote [] ["] +0 1 7 markupAttribute [] [Thing""] +0 7 1 markupTagDelimiter [] [>] +1 16 1 razorTransition [] [@] +0 1 2 keyword - control [] [if] +0 2 1 punctuation [] [(] +0 1 4 parameter name [] [bids] +0 5 1 operator [] [>] +0 2 1 number [] [0] +0 1 1 punctuation [] [)] +1 16 1 punctuation [] [{] +1 20 6 razorDirective [] [Div a par
+Div b par
+Div a par
+Div b par
+Div a par
+Div b par
+Div a par
+Div b par
+Div a par
+Div b par
+Div a par
+Div b par
+Div a par
+Div b par
+Div a par
+Div b par
+Div a par
+Div b par|]
+Div a par
+Div b par
+Div a par
|] +Div b par
+Div b par
+Div a par
+
+ Div a par
+Div b par
+Div b par
+
+ Div a par
+Deeply nested par
+Deeply nested par
+Deeply nested par
+Deeply nested par
+