Эх сурвалжийг харах

Remove $ from the variable name. Bye bye PHP

Cesar Rodas 9 сар өмнө
parent
commit
33f801b0ba

+ 1 - 1
utxo/src/filter_expr/expr.pest

@@ -25,7 +25,7 @@ hex_digit = @{ '0'..'9' | 'a'..'f' | 'A'..'F' }
 
 
 // variable
-variable     = ${ "$" ~ ident ~ (^"." ~ ident)* }
+variable     = ${ ident ~ (^"." ~ ident)* }
 ident        = @{  ("_" | alpha) ~ ("_" | alpha_num)* }
 alpha        = _{ 'a'..'z' | 'A'..'Z' }
 alpha_num    = _{ alpha | '0'..'9' }

+ 2 - 2
utxo/src/filter_expr/tests/always_true.expr

@@ -3,8 +3,8 @@
 /// the expression is an OR, the whole expression is true and it makes no further sense to continue
 /// evaluating
 (
-    $foo = 3 + 2 * 4 / 2 * 298210 + $bar
-    AND 25 = 5*$five
+    foo = 3 + 2 * 4 / 2 * 298210 + bar
+    AND 25 = 5*five
 )
 OR false
 OR  1 = 1

+ 1 - 1
utxo/src/filter_expr/tests/nested.expr

@@ -1 +1 @@
-$foo = 3 + 2 * 4 / 2 * 298210 + $bar AND 25 * 27 / 3/ 3 /3 = 5*$five
+foo = 3 + 2 * 4 / 2 * 298210 + bar AND 25 * 27 / 3/ 3 /3 = 5*five

+ 1 - 1
utxo/src/filter_expr/tests/program1.expr

@@ -1 +1 @@
-5 + 1 = $external + 1 AND 5 = $external
+5 + 1 = external + 1 AND 5 = external