コード例 #1
0
            public override void VisitLiteralAttributeSpan(LiteralAttributeChunkGenerator chunkGenerator, Span span)
            {
                _builder.Push(new HtmlAttributeValueIntermediateNode()
                {
                    Prefix = chunkGenerator.Prefix,
                    Source = BuildSourceSpanFromNode(span),
                });

                var        location  = chunkGenerator.Value.Location;
                SourceSpan?valueSpan = null;

                if (location != SourceLocation.Undefined)
                {
                    valueSpan = new SourceSpan(
                        location.FilePath ?? FilePath,
                        location.AbsoluteIndex,
                        location.LineIndex,
                        location.CharacterIndex,
                        chunkGenerator.Value.Value.Length);
                }

                _builder.Add(new IntermediateToken()
                {
                    Content = chunkGenerator.Value,
                    Kind    = TokenKind.Html,
                    Source  = valueSpan
                });

                _builder.Pop();
            }
コード例 #2
0
ファイル: ParserVisitor.cs プロジェクト: vyaspranjal33/Razor
 public virtual void VisitLiteralAttributeSpan(LiteralAttributeChunkGenerator chunkGenerator, Span span)
 {
     VisitDefault(span);
 }