mirror of
https://github.com/ProgramSnail/Lama.git
synced 2025-12-06 14:58:50 +00:00
Pre-HW12
This commit is contained in:
parent
57588f2605
commit
72c963f60f
2 changed files with 23 additions and 3 deletions
|
|
@ -231,13 +231,19 @@ module Expr =
|
|||
!(Ostap.Util.expr
|
||||
(fun x -> x)
|
||||
(Array.map (fun (a, s) -> a,
|
||||
List.map (fun s -> ostap(- $(s)), (fun x y -> Binop (s, x, y))) s
|
||||
List.map (fun s -> ostap(- $(s)),
|
||||
(fun x y ->
|
||||
match s with
|
||||
"++" -> Call ("strcat", [x; y])
|
||||
| _ -> Binop (s, x, y)
|
||||
)
|
||||
) s
|
||||
)
|
||||
[|
|
||||
`Lefta, ["!!"];
|
||||
`Lefta, ["&&"];
|
||||
`Nona , ["=="; "!="; "<="; "<"; ">="; ">"];
|
||||
`Lefta, ["+" ; "-"];
|
||||
`Lefta, ["++"; "+" ; "-"];
|
||||
`Lefta, ["*" ; "/"; "%"];
|
||||
|]
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue