File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -1048,7 +1048,10 @@ class Parser
10481048 if (currentIs(tok! " ," ))
10491049 advance();
10501050 if (currentIs(tok! " )" ))
1051+ {
1052+ node.tokens = tokens[startIndex .. index];
10511053 return node;
1054+ }
10521055 mixin (parseNodeQ! (` node.message` , ` AssignExpression` ));
10531056 if (currentIs(tok! " ," ))
10541057 advance();
@@ -1129,6 +1132,7 @@ class Parser
11291132 node.tokens = tokens[startIndex .. index];
11301133 return node;
11311134 }
1135+ ternary.tokens = tokens[startIndex .. index];
11321136 return ternary;
11331137 }
11341138
@@ -3929,6 +3933,7 @@ class Parser
39293933 if (node.indexer is null )
39303934 {
39313935 goToBookmark(b);
3936+ node.tokens = tokens[startIndex .. index];
39323937 return node;
39333938 }
39343939 // indexer followed by ".." -> sliceExp -> type suffix
@@ -3937,6 +3942,7 @@ class Parser
39373942 allocator.rollback(cp);
39383943 node.indexer = null ;
39393944 goToBookmark(b);
3945+ node.tokens = tokens[startIndex .. index];
39403946 return node;
39413947 }
39423948 // otherwise either the index of a type list or a dim
@@ -4093,6 +4099,7 @@ class Parser
40934099 IfCondition parseIfCondition ()
40944100 {
40954101 IfCondition node = allocator.make! IfCondition;
4102+ auto startIndex = index;
40964103 const b = setBookmark();
40974104
40984105 // ex. case:
@@ -4164,6 +4171,7 @@ class Parser
41644171 {
41654172 error(" expression or declaration expected" );
41664173 }
4174+ node.tokens = tokens[startIndex .. index];
41674175 return node;
41684176 }
41694177
You can’t perform that action at this time.
0 commit comments