File tree 1 file changed +8
-0
lines changed
1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -1048,7 +1048,10 @@ class Parser
1048
1048
if (currentIs(tok! " ," ))
1049
1049
advance();
1050
1050
if (currentIs(tok! " )" ))
1051
+ {
1052
+ node.tokens = tokens[startIndex .. index];
1051
1053
return node;
1054
+ }
1052
1055
mixin (parseNodeQ! (` node.message` , ` AssignExpression` ));
1053
1056
if (currentIs(tok! " ," ))
1054
1057
advance();
@@ -1129,6 +1132,7 @@ class Parser
1129
1132
node.tokens = tokens[startIndex .. index];
1130
1133
return node;
1131
1134
}
1135
+ ternary.tokens = tokens[startIndex .. index];
1132
1136
return ternary;
1133
1137
}
1134
1138
@@ -3929,6 +3933,7 @@ class Parser
3929
3933
if (node.indexer is null )
3930
3934
{
3931
3935
goToBookmark(b);
3936
+ node.tokens = tokens[startIndex .. index];
3932
3937
return node;
3933
3938
}
3934
3939
// indexer followed by ".." -> sliceExp -> type suffix
@@ -3937,6 +3942,7 @@ class Parser
3937
3942
allocator.rollback(cp);
3938
3943
node.indexer = null ;
3939
3944
goToBookmark(b);
3945
+ node.tokens = tokens[startIndex .. index];
3940
3946
return node;
3941
3947
}
3942
3948
// otherwise either the index of a type list or a dim
@@ -4093,6 +4099,7 @@ class Parser
4093
4099
IfCondition parseIfCondition ()
4094
4100
{
4095
4101
IfCondition node = allocator.make! IfCondition;
4102
+ auto startIndex = index;
4096
4103
const b = setBookmark();
4097
4104
4098
4105
// ex. case:
@@ -4164,6 +4171,7 @@ class Parser
4164
4171
{
4165
4172
error(" expression or declaration expected" );
4166
4173
}
4174
+ node.tokens = tokens[startIndex .. index];
4167
4175
return node;
4168
4176
}
4169
4177
You can’t perform that action at this time.
0 commit comments