File tree Expand file tree Collapse file tree 2 files changed +6
-0
lines changed
packages/compiler-core/src Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -130,6 +130,8 @@ export interface BaseElementNode extends Node {
130130 type : NodeTypes . ELEMENT
131131 ns : Namespace
132132 tag : string
133+ tagLoc : SourceLocation
134+ closeTagLoc ?: SourceLocation
133135 tagType : ElementTypes
134136 props : Array < AttributeNode | DirectiveNode >
135137 children : TemplateChildNode [ ]
Original file line number Diff line number Diff line change @@ -140,6 +140,7 @@ const tokenizer = new Tokenizer(stack, {
140140 type : NodeTypes . ELEMENT ,
141141 tag : name ,
142142 ns : currentOptions . getNamespace ( name , stack [ 0 ] , currentOptions . ns ) ,
143+ tagLoc : getLoc ( start , end ) ,
143144 tagType : ElementTypes . ELEMENT , // will be refined on tag close
144145 props : [ ] ,
145146 children : [ ] ,
@@ -165,6 +166,9 @@ const tokenizer = new Tokenizer(stack, {
165166 }
166167 for ( let j = 0 ; j <= i ; j ++ ) {
167168 const el = stack . shift ( ) !
169+ if ( j === i ) {
170+ el . closeTagLoc = getLoc ( start , end )
171+ }
168172 onCloseTag ( el , end , j < i )
169173 }
170174 break
You can’t perform that action at this time.
0 commit comments