mirror of
https://github.com/ProgramSnail/Lama.git
synced 2025-12-26 16:48:46 +00:00
This commit is contained in:
parent
1849c7029b
commit
8f01e5eb5b
2 changed files with 2 additions and 2 deletions
|
|
@ -746,7 +746,7 @@ module Expr =
|
|||
|
||||
| %"if" e:parse[infix][Val] %"then" the:scope[infix][atr]
|
||||
elif:(%"elif" parse[infix][Val] %"then" scope[infix][atr])*
|
||||
els:(%"else" scope[infix][atr])? %"fi"
|
||||
els:("else" s:scope[infix][atr] {Some s} | {isVoid atr} => empty {None}) %"fi"
|
||||
{If (e, the, List.fold_right (fun (e, t) elif -> If (e, t, elif)) elif (match els with Some e -> e | _ -> materialize atr Skip))}
|
||||
| %"while" e:parse[infix][Val] %"do" s:scope[infix][Void]
|
||||
=> {isVoid atr} => %"od" {materialize atr (While (e, s))}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue