mirror of
https://github.com/ProgramSnail/Lama.git
synced 2025-12-24 07:38:46 +00:00
Fixed Ostap::expr interface to comply the spec
This commit is contained in:
parent
52281261c4
commit
0c38e4b1df
8 changed files with 8 additions and 8 deletions
|
|
@ -13,7 +13,7 @@ local a = token ("a"),
|
|||
sub = [token ("-"), fun (l, _, r) {Sub (l, r)}],
|
||||
mul = [token ("*"), fun (l, _, r) {Mul (l, r)}],
|
||||
div = [token ("/"), fun (l, _, r) {Div (l, r)}],
|
||||
exp = expr ({[Left, {add, sub}], [Left, {mul, div}]}, a) (id),
|
||||
exp = expr ({[Left, {add, sub}], [Left, {mul, div}]}, a),
|
||||
i;
|
||||
|
||||
printf ("%s\n", parseString (exp |> bypass (eof), gen (5)).string)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue