Fixed array expr
This commit is contained in:
@@ -459,10 +459,12 @@ tuple = {
|
||||
"(" ~ (expr ~ ("," ~ expr)*)? ~ ","? ~ ")"
|
||||
}
|
||||
|
||||
array = {
|
||||
"[" ~ expr ~ ";" ~ expr ~ "]" // Repeat notation: [0; 10]
|
||||
array_repeat = {
|
||||
"[" ~ expr ~ ";" ~ expr ~ "]"
|
||||
}
|
||||
|
||||
| "[" ~ (expr ~ ("," ~ expr)* ~ ","?)? ~ "]" // Standard elements initialization
|
||||
array = {
|
||||
"[" ~ (expr ~ ("," ~ expr)* ~ ","?)? ~ "]"
|
||||
}
|
||||
|
||||
// ------------------------------------------------------
|
||||
@@ -496,6 +498,7 @@ primary = {
|
||||
| literal
|
||||
| expr_path
|
||||
| tuple
|
||||
| array_repeat
|
||||
| array
|
||||
}
|
||||
|
||||
@@ -624,3 +627,4 @@ bin_op = {
|
||||
expr = { term ~ (bin_op ~ term)* }
|
||||
|
||||
term = { prefix* ~ primary ~ postfix* }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user