File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -83,22 +83,22 @@ const Token = {
8383 */
8484function convertTemplatePart ( tokens , code ) {
8585 const firstToken = tokens [ 0 ] ,
86- lastTemplateToken = tokens . at ( - 1 ) ;
86+ lastTemplateToken = /** @type { acorn.Token } */ ( tokens . at ( - 1 ) ) ;
8787
8888 /** @type {EsprimaToken } */
8989 const token = {
9090 type : Token . Template ,
91- value : code . slice ( firstToken . start , lastTemplateToken ? .end )
91+ value : code . slice ( firstToken . start , lastTemplateToken . end )
9292 } ;
9393
94- if ( firstToken . loc && lastTemplateToken ? .loc ) {
94+ if ( firstToken . loc && lastTemplateToken . loc ) {
9595 token . loc = {
9696 start : firstToken . loc . start ,
9797 end : lastTemplateToken . loc . end
9898 } ;
9999 }
100100
101- if ( firstToken . range && lastTemplateToken ? .range ) {
101+ if ( firstToken . range && lastTemplateToken . range ) {
102102 token . start = firstToken . range [ 0 ] ;
103103 token . end = lastTemplateToken . range [ 1 ] ;
104104 token . range = [ token . start , token . end ] ;
You can’t perform that action at this time.
0 commit comments