Setting TokenKind for RazorIRToken
This commit is contained in:
parent
a784265747
commit
a74cda4402
|
|
@ -53,6 +53,7 @@ namespace Microsoft.AspNetCore.Mvc.Razor.Extensions
|
||||||
RazorIRBuilder.Create(statement)
|
RazorIRBuilder.Create(statement)
|
||||||
.Add(new RazorIRToken()
|
.Add(new RazorIRToken()
|
||||||
{
|
{
|
||||||
|
Kind = RazorIRToken.TokenKind.CSharp,
|
||||||
Content = writer.Builder.ToString()
|
Content = writer.Builder.ToString()
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -122,6 +122,7 @@ public class __Generated__TagCloudViewComponentTagHelper : Microsoft.AspNetCore.
|
||||||
",
|
",
|
||||||
tokenNode.Content,
|
tokenNode.Content,
|
||||||
ignoreLineEndingDifferences: true);
|
ignoreLineEndingDifferences: true);
|
||||||
|
Assert.Equal(tokenNode.Kind, RazorIRToken.TokenKind.CSharp);
|
||||||
}
|
}
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
|
|
@ -194,6 +195,7 @@ public class __Generated__TagCloudViewComponentTagHelper : Microsoft.AspNetCore.
|
||||||
",
|
",
|
||||||
tokenNode.Content,
|
tokenNode.Content,
|
||||||
ignoreLineEndingDifferences: true);
|
ignoreLineEndingDifferences: true);
|
||||||
|
Assert.Equal(tokenNode.Kind, RazorIRToken.TokenKind.CSharp);
|
||||||
}
|
}
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
|
|
@ -278,6 +280,7 @@ public class __Generated__TagCloudViewComponentTagHelper : Microsoft.AspNetCore.
|
||||||
",
|
",
|
||||||
tokenNode.Content,
|
tokenNode.Content,
|
||||||
ignoreLineEndingDifferences: true);
|
ignoreLineEndingDifferences: true);
|
||||||
|
Assert.Equal(tokenNode.Kind, RazorIRToken.TokenKind.CSharp);
|
||||||
}
|
}
|
||||||
|
|
||||||
private RazorCodeDocument CreateDocument(string content)
|
private RazorCodeDocument CreateDocument(string content)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue