File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ export class Identifier implements SlangNode {
1919 this . comments = [ ] ;
2020 this . loc = {
2121 start : offset ,
22- end : offset + ast . textLength . utf8 ,
22+ end : offset + ast . textLength . utf16 ,
2323 leadingOffset : 0 ,
2424 trailingOffset : 0
2525 } ;
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ export class YulIdentifier implements SlangNode {
1919 this . comments = [ ] ;
2020 this . loc = {
2121 start : offset ,
22- end : offset + ast . textLength . utf8 ,
22+ end : offset + ast . textLength . utf16 ,
2323 leadingOffset : 0 ,
2424 trailingOffset : 0
2525 } ;
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ function getLeadingOffset(children: Node[]): number {
2121 // non-whitespace token.
2222 return offset ;
2323 }
24- offset += child . textLength . utf8 ;
24+ offset += child . textLength . utf16 ;
2525 }
2626 return offset ;
2727}
@@ -59,7 +59,7 @@ export function getNodeMetadata(
5959 value : child . text ,
6060 loc : {
6161 start : offset ,
62- end : offset + child . textLength . utf8
62+ end : offset + child . textLength . utf16
6363 }
6464 } ) ;
6565 break ;
@@ -74,7 +74,7 @@ export function getNodeMetadata(
7474 }
7575 }
7676
77- offset += child . textLength . utf8 ;
77+ offset += child . textLength . utf16 ;
7878 return offsetsArray ;
7979 } , [ ] ) ;
8080
@@ -86,7 +86,7 @@ export function getNodeMetadata(
8686 : getLeadingOffset ( children . reverse ( ) ) ;
8787 const loc = {
8888 start : initialOffset + leadingOffset ,
89- end : initialOffset + ast . cst . textLength . utf8 - trailingOffset ,
89+ end : initialOffset + ast . cst . textLength . utf16 - trailingOffset ,
9090 leadingOffset,
9191 trailingOffset
9292 } ;
You can’t perform that action at this time.
0 commit comments