Fix: Broken intellisense for extensible directives
This commit is contained in:
parent
b12683a35d
commit
4b68a48f1d
|
|
@ -57,6 +57,13 @@ namespace Microsoft.AspNetCore.Razor.Language.Extensions
|
|||
{
|
||||
case DirectiveTokenKind.Type:
|
||||
|
||||
if (string.IsNullOrEmpty(node.Content))
|
||||
{
|
||||
// This is most likely a marker symbol.
|
||||
WriteMarkerSymbol(context, node);
|
||||
break;
|
||||
}
|
||||
|
||||
// {node.Content} __typeHelper = default({node.Content});
|
||||
|
||||
context.AddSourceMappingFor(node);
|
||||
|
|
@ -71,6 +78,13 @@ namespace Microsoft.AspNetCore.Razor.Language.Extensions
|
|||
|
||||
case DirectiveTokenKind.Member:
|
||||
|
||||
if (string.IsNullOrEmpty(node.Content))
|
||||
{
|
||||
// This is most likely a marker symbol.
|
||||
WriteMarkerSymbol(context, node);
|
||||
break;
|
||||
}
|
||||
|
||||
// global::System.Object {node.content} = null;
|
||||
|
||||
context.CodeWriter
|
||||
|
|
@ -86,6 +100,13 @@ namespace Microsoft.AspNetCore.Razor.Language.Extensions
|
|||
|
||||
case DirectiveTokenKind.Namespace:
|
||||
|
||||
if (string.IsNullOrEmpty(node.Content))
|
||||
{
|
||||
// This is most likely a marker symbol.
|
||||
WriteMarkerSymbol(context, node);
|
||||
break;
|
||||
}
|
||||
|
||||
// global::System.Object __typeHelper = nameof({node.Content});
|
||||
|
||||
context.CodeWriter
|
||||
|
|
@ -133,5 +154,13 @@ namespace Microsoft.AspNetCore.Razor.Language.Extensions
|
|||
}
|
||||
context.CodeWriter.WriteLine("))();");
|
||||
}
|
||||
|
||||
private void WriteMarkerSymbol(CodeRenderingContext context, DirectiveTokenIntermediateNode node)
|
||||
{
|
||||
// We want to map marker symbols to a location in the generated document
|
||||
// that will provide CSharp intellisense.
|
||||
context.AddSourceMappingFor(node);
|
||||
context.CodeWriter.Write(" ");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1665,6 +1665,15 @@ namespace Microsoft.AspNetCore.Razor.Language.Legacy
|
|||
{
|
||||
Span.ChunkGenerator = SpanChunkGenerator.Null;
|
||||
Output(SpanKindInternal.Code, AcceptedCharactersInternal.WhiteSpace);
|
||||
|
||||
if (EndOfFile || At(CSharpSymbolType.NewLine))
|
||||
{
|
||||
// Add a marker symbol to provide CSharp intellisense when we start typing the directive token.
|
||||
AddMarkerSymbolIfNecessary();
|
||||
Span.ChunkGenerator = new DirectiveTokenChunkGenerator(tokenDescriptor);
|
||||
Span.EditHandler = new DirectiveTokenEditHandler(Language.TokenizeString);
|
||||
Output(SpanKindInternal.Code, AcceptedCharactersInternal.NonWhiteSpace);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -16,8 +16,29 @@ namespace AspNetCore
|
|||
#pragma warning disable 219
|
||||
private void __RazorDirectiveTokenHelpers__() {
|
||||
((System.Action)(() => {
|
||||
}
|
||||
))();
|
||||
((System.Action)(() => {
|
||||
}
|
||||
))();
|
||||
((System.Action)(() => {
|
||||
}
|
||||
))();
|
||||
((System.Action)(() => {
|
||||
}
|
||||
))();
|
||||
((System.Action)(() => {
|
||||
MyService<TModel> __typeHelper = default(MyService<TModel>);
|
||||
}
|
||||
))();
|
||||
((System.Action)(() => {
|
||||
}
|
||||
))();
|
||||
((System.Action)(() => {
|
||||
}
|
||||
))();
|
||||
((System.Action)(() => {
|
||||
}
|
||||
))();
|
||||
}
|
||||
#pragma warning restore 219
|
||||
|
|
|
|||
|
|
@ -23,7 +23,14 @@ Document -
|
|||
DirectiveToken - (617:12,14 [96] ) - Microsoft.AspNetCore.Mvc.Razor.TagHelpers.UrlResolutionTagHelper, Microsoft.AspNetCore.Mvc.Razor
|
||||
DirectiveToken - (729:13,14 [87] ) - Microsoft.AspNetCore.Mvc.Razor.TagHelpers.HeadTagHelper, Microsoft.AspNetCore.Mvc.Razor
|
||||
DirectiveToken - (832:14,14 [87] ) - Microsoft.AspNetCore.Mvc.Razor.TagHelpers.BodyTagHelper, Microsoft.AspNetCore.Mvc.Razor
|
||||
DirectiveToken - (119:6,6 [0] IncompleteDirectives.cshtml) -
|
||||
DirectiveToken - (128:7,7 [0] IncompleteDirectives.cshtml) -
|
||||
DirectiveToken - (139:9,7 [0] IncompleteDirectives.cshtml) -
|
||||
DirectiveToken - (149:10,8 [0] IncompleteDirectives.cshtml) -
|
||||
DirectiveToken - (159:11,8 [17] IncompleteDirectives.cshtml) - MyService<TModel>
|
||||
DirectiveToken - (176:11,25 [0] IncompleteDirectives.cshtml) -
|
||||
DirectiveToken - (190:13,10 [0] IncompleteDirectives.cshtml) -
|
||||
DirectiveToken - (203:14,11 [0] IncompleteDirectives.cshtml) -
|
||||
CSharpCode -
|
||||
IntermediateToken - - CSharp - #pragma warning disable 0414
|
||||
CSharpCode -
|
||||
|
|
@ -38,25 +45,32 @@ Document -
|
|||
HtmlContent - (108:4,6 [5] IncompleteDirectives.cshtml)
|
||||
IntermediateToken - (108:4,6 [5] IncompleteDirectives.cshtml) - Html - "\n\n
|
||||
MalformedDirective - (113:6,0 [6] IncompleteDirectives.cshtml) - model
|
||||
DirectiveToken - (119:6,6 [0] IncompleteDirectives.cshtml) -
|
||||
HtmlContent - (119:6,6 [2] IncompleteDirectives.cshtml)
|
||||
IntermediateToken - (119:6,6 [2] IncompleteDirectives.cshtml) - Html - \n
|
||||
MalformedDirective - (121:7,0 [7] IncompleteDirectives.cshtml) - model
|
||||
DirectiveToken - (128:7,7 [0] IncompleteDirectives.cshtml) -
|
||||
HtmlContent - (128:7,7 [4] IncompleteDirectives.cshtml)
|
||||
IntermediateToken - (128:7,7 [4] IncompleteDirectives.cshtml) - Html - \n\n
|
||||
MalformedDirective - (132:9,0 [7] IncompleteDirectives.cshtml) - inject
|
||||
DirectiveToken - (139:9,7 [0] IncompleteDirectives.cshtml) -
|
||||
HtmlContent - (139:9,7 [2] IncompleteDirectives.cshtml)
|
||||
IntermediateToken - (139:9,7 [2] IncompleteDirectives.cshtml) - Html - \n
|
||||
MalformedDirective - (141:10,0 [8] IncompleteDirectives.cshtml) - inject
|
||||
DirectiveToken - (149:10,8 [0] IncompleteDirectives.cshtml) -
|
||||
HtmlContent - (149:10,8 [2] IncompleteDirectives.cshtml)
|
||||
IntermediateToken - (149:10,8 [2] IncompleteDirectives.cshtml) - Html - \n
|
||||
MalformedDirective - (151:11,0 [25] IncompleteDirectives.cshtml) - inject
|
||||
DirectiveToken - (159:11,8 [17] IncompleteDirectives.cshtml) - MyService<TModel>
|
||||
DirectiveToken - (176:11,25 [0] IncompleteDirectives.cshtml) -
|
||||
HtmlContent - (176:11,25 [4] IncompleteDirectives.cshtml)
|
||||
IntermediateToken - (176:11,25 [4] IncompleteDirectives.cshtml) - Html - \n\n
|
||||
MalformedDirective - (180:13,0 [10] IncompleteDirectives.cshtml) - namespace
|
||||
DirectiveToken - (190:13,10 [0] IncompleteDirectives.cshtml) -
|
||||
HtmlContent - (190:13,10 [2] IncompleteDirectives.cshtml)
|
||||
IntermediateToken - (190:13,10 [2] IncompleteDirectives.cshtml) - Html - \n
|
||||
MalformedDirective - (192:14,0 [11] IncompleteDirectives.cshtml) - namespace
|
||||
DirectiveToken - (203:14,11 [0] IncompleteDirectives.cshtml) -
|
||||
HtmlContent - (203:14,11 [2] IncompleteDirectives.cshtml)
|
||||
IntermediateToken - (203:14,11 [2] IncompleteDirectives.cshtml) - Html - \n
|
||||
Inject -
|
||||
|
|
|
|||
|
|
@ -1,5 +1,40 @@
|
|||
Source Location: (119:6,6 [0] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml)
|
||||
||
|
||||
Generated Location: (678:18,0 [0] )
|
||||
||
|
||||
|
||||
Source Location: (128:7,7 [0] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml)
|
||||
||
|
||||
Generated Location: (731:21,0 [0] )
|
||||
||
|
||||
|
||||
Source Location: (139:9,7 [0] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml)
|
||||
||
|
||||
Generated Location: (784:24,0 [0] )
|
||||
||
|
||||
|
||||
Source Location: (149:10,8 [0] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml)
|
||||
||
|
||||
Generated Location: (837:27,0 [0] )
|
||||
||
|
||||
|
||||
Source Location: (159:11,8 [17] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml)
|
||||
|MyService<TModel>|
|
||||
Generated Location: (678:18,0 [17] )
|
||||
Generated Location: (890:30,0 [17] )
|
||||
|MyService<TModel>|
|
||||
|
||||
Source Location: (176:11,25 [0] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml)
|
||||
||
|
||||
Generated Location: (1012:34,0 [0] )
|
||||
||
|
||||
|
||||
Source Location: (190:13,10 [0] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml)
|
||||
||
|
||||
Generated Location: (1065:37,0 [0] )
|
||||
||
|
||||
|
||||
Source Location: (203:14,11 [0] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml)
|
||||
||
|
||||
Generated Location: (1118:40,0 [0] )
|
||||
||
|
||||
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@ Document -
|
|||
CSharpCode -
|
||||
IntermediateToken - - CSharp - EndContext();
|
||||
MalformedDirective - (113:6,0 [6] IncompleteDirectives.cshtml) - model
|
||||
DirectiveToken - (119:6,6 [0] IncompleteDirectives.cshtml) -
|
||||
CSharpCode -
|
||||
IntermediateToken - - CSharp - BeginContext(119, 2, true);
|
||||
HtmlContent - (119:6,6 [2] IncompleteDirectives.cshtml)
|
||||
|
|
@ -33,6 +34,7 @@ Document -
|
|||
CSharpCode -
|
||||
IntermediateToken - - CSharp - EndContext();
|
||||
MalformedDirective - (121:7,0 [7] IncompleteDirectives.cshtml) - model
|
||||
DirectiveToken - (128:7,7 [0] IncompleteDirectives.cshtml) -
|
||||
CSharpCode -
|
||||
IntermediateToken - - CSharp - BeginContext(128, 4, true);
|
||||
HtmlContent - (128:7,7 [4] IncompleteDirectives.cshtml)
|
||||
|
|
@ -40,6 +42,7 @@ Document -
|
|||
CSharpCode -
|
||||
IntermediateToken - - CSharp - EndContext();
|
||||
MalformedDirective - (132:9,0 [7] IncompleteDirectives.cshtml) - inject
|
||||
DirectiveToken - (139:9,7 [0] IncompleteDirectives.cshtml) -
|
||||
CSharpCode -
|
||||
IntermediateToken - - CSharp - BeginContext(139, 2, true);
|
||||
HtmlContent - (139:9,7 [2] IncompleteDirectives.cshtml)
|
||||
|
|
@ -47,6 +50,7 @@ Document -
|
|||
CSharpCode -
|
||||
IntermediateToken - - CSharp - EndContext();
|
||||
MalformedDirective - (141:10,0 [8] IncompleteDirectives.cshtml) - inject
|
||||
DirectiveToken - (149:10,8 [0] IncompleteDirectives.cshtml) -
|
||||
CSharpCode -
|
||||
IntermediateToken - - CSharp - BeginContext(149, 2, true);
|
||||
HtmlContent - (149:10,8 [2] IncompleteDirectives.cshtml)
|
||||
|
|
@ -55,6 +59,7 @@ Document -
|
|||
IntermediateToken - - CSharp - EndContext();
|
||||
MalformedDirective - (151:11,0 [25] IncompleteDirectives.cshtml) - inject
|
||||
DirectiveToken - (159:11,8 [17] IncompleteDirectives.cshtml) - MyService<TModel>
|
||||
DirectiveToken - (176:11,25 [0] IncompleteDirectives.cshtml) -
|
||||
CSharpCode -
|
||||
IntermediateToken - - CSharp - BeginContext(176, 4, true);
|
||||
HtmlContent - (176:11,25 [4] IncompleteDirectives.cshtml)
|
||||
|
|
@ -62,6 +67,7 @@ Document -
|
|||
CSharpCode -
|
||||
IntermediateToken - - CSharp - EndContext();
|
||||
MalformedDirective - (180:13,0 [10] IncompleteDirectives.cshtml) - namespace
|
||||
DirectiveToken - (190:13,10 [0] IncompleteDirectives.cshtml) -
|
||||
CSharpCode -
|
||||
IntermediateToken - - CSharp - BeginContext(190, 2, true);
|
||||
HtmlContent - (190:13,10 [2] IncompleteDirectives.cshtml)
|
||||
|
|
@ -69,6 +75,7 @@ Document -
|
|||
CSharpCode -
|
||||
IntermediateToken - - CSharp - EndContext();
|
||||
MalformedDirective - (192:14,0 [11] IncompleteDirectives.cshtml) - namespace
|
||||
DirectiveToken - (203:14,11 [0] IncompleteDirectives.cshtml) -
|
||||
CSharpCode -
|
||||
IntermediateToken - - CSharp - BeginContext(203, 2, true);
|
||||
HtmlContent - (203:14,11 [2] IncompleteDirectives.cshtml)
|
||||
|
|
|
|||
|
|
@ -16,8 +16,23 @@ namespace AspNetCore
|
|||
#pragma warning disable 219
|
||||
private void __RazorDirectiveTokenHelpers__() {
|
||||
((System.Action)(() => {
|
||||
}
|
||||
))();
|
||||
((System.Action)(() => {
|
||||
}
|
||||
))();
|
||||
((System.Action)(() => {
|
||||
}
|
||||
))();
|
||||
((System.Action)(() => {
|
||||
}
|
||||
))();
|
||||
((System.Action)(() => {
|
||||
MyService<TModel> __typeHelper = default(MyService<TModel>);
|
||||
}
|
||||
))();
|
||||
((System.Action)(() => {
|
||||
}
|
||||
))();
|
||||
}
|
||||
#pragma warning restore 219
|
||||
|
|
|
|||
|
|
@ -21,7 +21,12 @@ Document -
|
|||
DirectiveToken - (507:11,8 [70] ) - global::Microsoft.AspNetCore.Mvc.ViewFeatures.IModelExpressionProvider
|
||||
DirectiveToken - (578:11,79 [23] ) - ModelExpressionProvider
|
||||
DirectiveToken - (617:12,14 [96] ) - Microsoft.AspNetCore.Mvc.Razor.TagHelpers.UrlResolutionTagHelper, Microsoft.AspNetCore.Mvc.Razor
|
||||
DirectiveToken - (93:2,6 [0] IncompleteDirectives.cshtml) -
|
||||
DirectiveToken - (102:3,7 [0] IncompleteDirectives.cshtml) -
|
||||
DirectiveToken - (113:5,7 [0] IncompleteDirectives.cshtml) -
|
||||
DirectiveToken - (123:6,8 [0] IncompleteDirectives.cshtml) -
|
||||
DirectiveToken - (133:7,8 [17] IncompleteDirectives.cshtml) - MyService<TModel>
|
||||
DirectiveToken - (150:7,25 [0] IncompleteDirectives.cshtml) -
|
||||
CSharpCode -
|
||||
IntermediateToken - - CSharp - #pragma warning disable 0414
|
||||
CSharpCode -
|
||||
|
|
@ -32,19 +37,24 @@ Document -
|
|||
HtmlContent - (83:0,83 [4] IncompleteDirectives.cshtml)
|
||||
IntermediateToken - (83:0,83 [4] IncompleteDirectives.cshtml) - Html - \n\n
|
||||
MalformedDirective - (87:2,0 [6] IncompleteDirectives.cshtml) - model
|
||||
DirectiveToken - (93:2,6 [0] IncompleteDirectives.cshtml) -
|
||||
HtmlContent - (93:2,6 [2] IncompleteDirectives.cshtml)
|
||||
IntermediateToken - (93:2,6 [2] IncompleteDirectives.cshtml) - Html - \n
|
||||
MalformedDirective - (95:3,0 [7] IncompleteDirectives.cshtml) - model
|
||||
DirectiveToken - (102:3,7 [0] IncompleteDirectives.cshtml) -
|
||||
HtmlContent - (102:3,7 [4] IncompleteDirectives.cshtml)
|
||||
IntermediateToken - (102:3,7 [4] IncompleteDirectives.cshtml) - Html - \n\n
|
||||
MalformedDirective - (106:5,0 [7] IncompleteDirectives.cshtml) - inject
|
||||
DirectiveToken - (113:5,7 [0] IncompleteDirectives.cshtml) -
|
||||
HtmlContent - (113:5,7 [2] IncompleteDirectives.cshtml)
|
||||
IntermediateToken - (113:5,7 [2] IncompleteDirectives.cshtml) - Html - \n
|
||||
MalformedDirective - (115:6,0 [8] IncompleteDirectives.cshtml) - inject
|
||||
DirectiveToken - (123:6,8 [0] IncompleteDirectives.cshtml) -
|
||||
HtmlContent - (123:6,8 [2] IncompleteDirectives.cshtml)
|
||||
IntermediateToken - (123:6,8 [2] IncompleteDirectives.cshtml) - Html - \n
|
||||
MalformedDirective - (125:7,0 [25] IncompleteDirectives.cshtml) - inject
|
||||
DirectiveToken - (133:7,8 [17] IncompleteDirectives.cshtml) - MyService<TModel>
|
||||
DirectiveToken - (150:7,25 [0] IncompleteDirectives.cshtml) -
|
||||
HtmlContent - (150:7,25 [2] IncompleteDirectives.cshtml)
|
||||
IntermediateToken - (150:7,25 [2] IncompleteDirectives.cshtml) - Html - \n
|
||||
Inject -
|
||||
|
|
|
|||
|
|
@ -1,5 +1,30 @@
|
|||
Source Location: (93:2,6 [0] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml)
|
||||
||
|
||||
Generated Location: (687:18,0 [0] )
|
||||
||
|
||||
|
||||
Source Location: (102:3,7 [0] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml)
|
||||
||
|
||||
Generated Location: (740:21,0 [0] )
|
||||
||
|
||||
|
||||
Source Location: (113:5,7 [0] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml)
|
||||
||
|
||||
Generated Location: (793:24,0 [0] )
|
||||
||
|
||||
|
||||
Source Location: (123:6,8 [0] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml)
|
||||
||
|
||||
Generated Location: (846:27,0 [0] )
|
||||
||
|
||||
|
||||
Source Location: (133:7,8 [17] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml)
|
||||
|MyService<TModel>|
|
||||
Generated Location: (687:18,0 [17] )
|
||||
Generated Location: (899:30,0 [17] )
|
||||
|MyService<TModel>|
|
||||
|
||||
Source Location: (150:7,25 [0] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml)
|
||||
||
|
||||
Generated Location: (1021:34,0 [0] )
|
||||
||
|
||||
|
||||
|
|
|
|||
|
|
@ -1747,7 +1747,9 @@ namespace Microsoft.AspNetCore.Razor.Language.Legacy
|
|||
new DirectiveChunkGenerator(descriptor),
|
||||
Factory.CodeTransition(),
|
||||
Factory.MetaCode("TestDirective").Accepts(AcceptedCharactersInternal.None),
|
||||
Factory.Span(SpanKindInternal.Code, " ", markup: false).Accepts(AcceptedCharactersInternal.WhiteSpace)));
|
||||
Factory.Span(SpanKindInternal.Code, " ", markup: false).Accepts(AcceptedCharactersInternal.WhiteSpace),
|
||||
Factory.Span(SpanKindInternal.Code, string.Empty, CSharpSymbolType.Unknown)
|
||||
.AsDirectiveToken(descriptor.Tokens[0])));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
|
|
|
|||
|
|
@ -30,7 +30,9 @@ namespace Microsoft.AspNetCore.Razor.Language.Legacy
|
|||
Factory.EmptyHtml(),
|
||||
new DirectiveBlock(chunkGenerator,
|
||||
Factory.CodeTransition(),
|
||||
Factory.MetaCode("section").Accepts(AcceptedCharactersInternal.None)),
|
||||
Factory.MetaCode("section").Accepts(AcceptedCharactersInternal.None),
|
||||
Factory.Span(SpanKindInternal.Code, string.Empty, CSharpSymbolType.Unknown)
|
||||
.AsDirectiveToken(DirectiveTokenDescriptor.CreateToken(DirectiveTokenKind.Member))),
|
||||
Factory.Markup(Environment.NewLine)));
|
||||
}
|
||||
|
||||
|
|
@ -82,7 +84,10 @@ namespace Microsoft.AspNetCore.Razor.Language.Legacy
|
|||
new DirectiveBlock(chunkGenerator,
|
||||
Factory.CodeTransition(),
|
||||
Factory.MetaCode("section").Accepts(AcceptedCharactersInternal.None),
|
||||
Factory.Span(SpanKindInternal.Code, " ", CSharpSymbolType.WhiteSpace).Accepts(AcceptedCharactersInternal.WhiteSpace)),
|
||||
Factory.Span(SpanKindInternal.Code, " ", CSharpSymbolType.WhiteSpace).Accepts(AcceptedCharactersInternal.WhiteSpace),
|
||||
Factory
|
||||
.Span(SpanKindInternal.Code, string.Empty, CSharpSymbolType.Unknown)
|
||||
.AsDirectiveToken(DirectiveTokenDescriptor.CreateToken(DirectiveTokenKind.Member))),
|
||||
Factory.Markup(Environment.NewLine + " ")));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -29,7 +29,9 @@ namespace Microsoft.AspNetCore.Razor.Language.Legacy
|
|||
Factory.EmptyHtml(),
|
||||
new DirectiveBlock(chunkGenerator,
|
||||
Factory.CodeTransition(),
|
||||
Factory.MetaCode("inherits").Accepts(AcceptedCharactersInternal.None)),
|
||||
Factory.MetaCode("inherits").Accepts(AcceptedCharactersInternal.None),
|
||||
Factory.Span(SpanKindInternal.Code, string.Empty, CSharpSymbolType.Unknown)
|
||||
.AsDirectiveToken(DirectiveTokenDescriptor.CreateToken(DirectiveTokenKind.Type))),
|
||||
Factory.EmptyHtml()));
|
||||
}
|
||||
|
||||
|
|
@ -69,7 +71,9 @@ namespace Microsoft.AspNetCore.Razor.Language.Legacy
|
|||
new DirectiveBlock(chunkGenerator,
|
||||
Factory.CodeTransition(),
|
||||
Factory.MetaCode("inherits").Accepts(AcceptedCharactersInternal.None),
|
||||
Factory.Span(SpanKindInternal.Code, " ", CSharpSymbolType.WhiteSpace).Accepts(AcceptedCharactersInternal.WhiteSpace)),
|
||||
Factory.Span(SpanKindInternal.Code, " ", CSharpSymbolType.WhiteSpace).Accepts(AcceptedCharactersInternal.WhiteSpace),
|
||||
Factory.Span(SpanKindInternal.Code, string.Empty, CSharpSymbolType.Unknown)
|
||||
.AsDirectiveToken(DirectiveTokenDescriptor.CreateToken(DirectiveTokenKind.Type))),
|
||||
Factory.Markup(Environment.NewLine + "foo")));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -42,6 +42,18 @@ global::System.Object __typeHelper = "";
|
|||
((System.Action)(() => {
|
||||
global::System.Object __typeHelper = ";
|
||||
}
|
||||
))();
|
||||
((System.Action)(() => {
|
||||
}
|
||||
))();
|
||||
((System.Action)(() => {
|
||||
}
|
||||
))();
|
||||
((System.Action)(() => {
|
||||
}
|
||||
))();
|
||||
((System.Action)(() => {
|
||||
}
|
||||
))();
|
||||
}
|
||||
#pragma warning restore 219
|
||||
|
|
|
|||
|
|
@ -11,6 +11,10 @@ Document -
|
|||
DirectiveToken - (212:10,16 [0] IncompleteDirectives.cshtml) -
|
||||
DirectiveToken - (231:11,17 [0] IncompleteDirectives.cshtml) -
|
||||
DirectiveToken - (250:12,17 [1] IncompleteDirectives.cshtml) - "
|
||||
DirectiveToken - (264:14,9 [0] IncompleteDirectives.cshtml) -
|
||||
DirectiveToken - (276:15,10 [0] IncompleteDirectives.cshtml) -
|
||||
DirectiveToken - (315:20,8 [0] IncompleteDirectives.cshtml) -
|
||||
DirectiveToken - (326:21,9 [0] IncompleteDirectives.cshtml) -
|
||||
CSharpCode -
|
||||
IntermediateToken - - CSharp - #pragma warning disable 0414
|
||||
CSharpCode -
|
||||
|
|
@ -57,17 +61,21 @@ Document -
|
|||
HtmlContent - (251:12,18 [4] IncompleteDirectives.cshtml)
|
||||
IntermediateToken - (251:12,18 [4] IncompleteDirectives.cshtml) - Html - \n\n
|
||||
MalformedDirective - (255:14,0 [9] IncompleteDirectives.cshtml) - inherits
|
||||
DirectiveToken - (264:14,9 [0] IncompleteDirectives.cshtml) -
|
||||
HtmlContent - (264:14,9 [2] IncompleteDirectives.cshtml)
|
||||
IntermediateToken - (264:14,9 [2] IncompleteDirectives.cshtml) - Html - \n
|
||||
MalformedDirective - (266:15,0 [10] IncompleteDirectives.cshtml) - inherits
|
||||
DirectiveToken - (276:15,10 [0] IncompleteDirectives.cshtml) -
|
||||
HtmlContent - (276:15,10 [4] IncompleteDirectives.cshtml)
|
||||
IntermediateToken - (276:15,10 [4] IncompleteDirectives.cshtml) - Html - \n\n
|
||||
MalformedDirective - (280:17,0 [12] IncompleteDirectives.cshtml) - functions
|
||||
MalformedDirective - (292:18,0 [15] IncompleteDirectives.cshtml) - functions
|
||||
MalformedDirective - (307:20,0 [8] IncompleteDirectives.cshtml) - section
|
||||
DirectiveToken - (315:20,8 [0] IncompleteDirectives.cshtml) -
|
||||
HtmlContent - (315:20,8 [2] IncompleteDirectives.cshtml)
|
||||
IntermediateToken - (315:20,8 [2] IncompleteDirectives.cshtml) - Html - \n
|
||||
MalformedDirective - (317:21,0 [9] IncompleteDirectives.cshtml) - section
|
||||
DirectiveToken - (326:21,9 [0] IncompleteDirectives.cshtml) -
|
||||
HtmlContent - (326:21,9 [4] IncompleteDirectives.cshtml)
|
||||
IntermediateToken - (326:21,9 [4] IncompleteDirectives.cshtml) - Html - \n\n
|
||||
MalformedDirective - (330:23,0 [9] IncompleteDirectives.cshtml) - section
|
||||
|
|
|
|||
|
|
@ -43,3 +43,23 @@ Source Location: (250:12,17 [1] TestFiles/IntegrationTests/CodeGenerationIntegra
|
|||
Generated Location: (1240:42,37 [1] )
|
||||
|"|
|
||||
|
||||
Source Location: (264:14,9 [0] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml)
|
||||
||
|
||||
Generated Location: (1304:46,0 [0] )
|
||||
||
|
||||
|
||||
Source Location: (276:15,10 [0] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml)
|
||||
||
|
||||
Generated Location: (1357:49,0 [0] )
|
||||
||
|
||||
|
||||
Source Location: (315:20,8 [0] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml)
|
||||
||
|
||||
Generated Location: (1410:52,0 [0] )
|
||||
||
|
||||
|
||||
Source Location: (326:21,9 [0] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml)
|
||||
||
|
||||
Generated Location: (1463:55,0 [0] )
|
||||
||
|
||||
|
||||
|
|
|
|||
|
|
@ -29,17 +29,21 @@ Document -
|
|||
HtmlContent - (253:13,0 [2] IncompleteDirectives.cshtml)
|
||||
IntermediateToken - (253:13,0 [2] IncompleteDirectives.cshtml) - Html - \n
|
||||
MalformedDirective - (255:14,0 [9] IncompleteDirectives.cshtml) - inherits
|
||||
DirectiveToken - (264:14,9 [0] IncompleteDirectives.cshtml) -
|
||||
HtmlContent - (264:14,9 [2] IncompleteDirectives.cshtml)
|
||||
IntermediateToken - (264:14,9 [2] IncompleteDirectives.cshtml) - Html - \n
|
||||
MalformedDirective - (266:15,0 [10] IncompleteDirectives.cshtml) - inherits
|
||||
DirectiveToken - (276:15,10 [0] IncompleteDirectives.cshtml) -
|
||||
HtmlContent - (276:15,10 [4] IncompleteDirectives.cshtml)
|
||||
IntermediateToken - (276:15,10 [4] IncompleteDirectives.cshtml) - Html - \n\n
|
||||
MalformedDirective - (280:17,0 [12] IncompleteDirectives.cshtml) - functions
|
||||
MalformedDirective - (292:18,0 [15] IncompleteDirectives.cshtml) - functions
|
||||
MalformedDirective - (307:20,0 [8] IncompleteDirectives.cshtml) - section
|
||||
DirectiveToken - (315:20,8 [0] IncompleteDirectives.cshtml) -
|
||||
HtmlContent - (315:20,8 [2] IncompleteDirectives.cshtml)
|
||||
IntermediateToken - (315:20,8 [2] IncompleteDirectives.cshtml) - Html - \n
|
||||
MalformedDirective - (317:21,0 [9] IncompleteDirectives.cshtml) - section
|
||||
DirectiveToken - (326:21,9 [0] IncompleteDirectives.cshtml) -
|
||||
HtmlContent - (326:21,9 [4] IncompleteDirectives.cshtml)
|
||||
IntermediateToken - (326:21,9 [4] IncompleteDirectives.cshtml) - Html - \n\n
|
||||
MalformedDirective - (330:23,0 [9] IncompleteDirectives.cshtml) - section
|
||||
|
|
|
|||
Loading…
Reference in New Issue