Commit bfc5bb9 1 parent 530a8ad commit bfc5bb9 Copy full SHA for bfc5bb9
File tree 3 files changed +13
-13
lines changed
3 files changed +13
-13
lines changed Original file line number Diff line number Diff line change @@ -1798,6 +1798,10 @@ impl Parser {
1798
1798
"emit" => "sequence",
1799
1799
"children" =>
1800
1800
(value!([
1801
+ (value!([
1802
+ "emit" => "identifier",
1803
+ "value" => "_"
1804
+ ])),
1801
1805
(value!([
1802
1806
"emit" => "value_token_touch",
1803
1807
"value" => "["
@@ -1814,10 +1818,6 @@ impl Parser {
1814
1818
"emit" => "value_token_touch",
1815
1819
"value" => "]"
1816
1820
])),
1817
- (value!([
1818
- "emit" => "identifier",
1819
- "value" => "_"
1820
- ])),
1821
1821
(value!([
1822
1822
"emit" => "call",
1823
1823
"children" =>
@@ -2118,10 +2118,6 @@ impl Parser {
2118
2118
"emit" => "identifier",
2119
2119
"value" => "Variable"
2120
2120
])),
2121
- (value!([
2122
- "emit" => "identifier",
2123
- "value" => "_"
2124
- ])),
2125
2121
(value!([
2126
2122
"emit" => "op_mod_kle",
2127
2123
"children" =>
@@ -5058,6 +5054,10 @@ impl Parser {
5058
5054
]))
5059
5055
]))
5060
5056
])),
5057
+ (value!([
5058
+ "emit" => "identifier",
5059
+ "value" => "_"
5060
+ ])),
5061
5061
(value!([
5062
5062
"emit" => "value_instance",
5063
5063
"children" =>
Original file line number Diff line number Diff line change 1
1
# The Tokay programming language
2
- # Copyright © 2023 by Jan Max Meyer, Phorward Software Technologies.
2
+ # Copyright © 2024 by Jan Max Meyer, Phorward Software Technologies.
3
3
# Licensed under the MIT license. See LICENSE for more information.
4
4
#
5
5
# This Tokay program expresses Tokay's grammar in itself.
@@ -127,7 +127,7 @@ Ccl : @{
127
127
# Statics, Variables, Loads
128
128
129
129
Subscript : @{
130
- '[' _ Expression ']' _ ast("item")
130
+ _ '[' _ Expression ']' ast("item")
131
131
}
132
132
133
133
Attribute : @{
@@ -147,7 +147,7 @@ Variable : @{
147
147
}
148
148
149
149
Lvalue : @{
150
- Variable _ Subscript* ast("lvalue") # Lvalue currently doesn't allow attribute assignment!
150
+ Variable Subscript* ast("lvalue") # Lvalue currently doesn't allow attribute assignment!
151
151
}
152
152
153
153
Load : @{
@@ -284,7 +284,7 @@ Atomic : @{
284
284
TokenModifier
285
285
Keyword<'if'> _ Expect<Expression> ___ Expect<Statement> \
286
286
(___ Keyword<'else'> _ ___ Expect<Statement>)? ast("op_if")
287
- Keyword<'for'> _ Expect<Lvalue> Keyword<Expect<'in'>> _ Expect<Expression> \
287
+ Keyword<'for'> _ Expect<Lvalue> _ Keyword<Expect<'in'>> _ Expect<Expression> \
288
288
___ Expect<Statement> ast("op_for")
289
289
Keyword<'loop'> _ Expression ___ Block ast("op_loop")
290
290
Keyword<'loop'> _ Expect<Block> ast("op_loop")
Original file line number Diff line number Diff line change 25
25
l = ,
26
26
i = 0
27
27
l += i
28
- l, ++i
28
+ l ++i
29
29
30
30
# iadd with mutable object
31
31
l = ,
You can’t perform that action at this time.
0 commit comments