Fix #1194 - DirectiveIRNode doesn't have source

Now with line mappings!
This commit is contained in:
Ryan Nowak 2017-04-10 18:14:57 -07:00
parent 64e5aaf478
commit b4b4a19549
2 changed files with 2 additions and 1 deletions

View File

@ -53,7 +53,6 @@ namespace Microsoft.AspNetCore.Mvc.Razor.Extensions
{
TypeName = typeName,
MemberName = memberName,
Source = directive.Source,
Parent = visitor.Class,
};

View File

@ -204,6 +204,7 @@ namespace Microsoft.AspNetCore.Razor.Language
{
Name = chunkGenerator.Descriptor.Name,
Descriptor = chunkGenerator.Descriptor,
Source = BuildSourceSpanFromNode(block),
});
base.VisitDirectiveBlock(chunkGenerator, block);
@ -242,6 +243,7 @@ namespace Microsoft.AspNetCore.Razor.Language
{
Name = chunkGenerator.Descriptor.Name,
Descriptor = chunkGenerator.Descriptor,
Source = BuildSourceSpanFromNode(block),
});
VisitDefault(block);