mirror of
https://github.com/ProgramSnail/Lama.git
synced 2025-12-05 22:38:44 +00:00
This commit is contained in:
parent
d06d9a2506
commit
4c736914d4
5 changed files with 20 additions and 8 deletions
1
regression/orig/test107.log
Normal file
1
regression/orig/test107.log
Normal file
|
|
@ -0,0 +1 @@
|
|||
> 0
|
||||
1
regression/test107.input
Normal file
1
regression/test107.input
Normal file
|
|
@ -0,0 +1 @@
|
|||
5
|
||||
7
regression/test107.lama
Normal file
7
regression/test107.lama
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
local n = read ();
|
||||
|
||||
case 0 of
|
||||
0 -> 0 + 0 + 0
|
||||
esac;
|
||||
|
||||
write (0)
|
||||
|
|
@ -587,12 +587,15 @@ module Expr =
|
|||
let sem s = (fun x atr y -> ignore atr (Call (Var s, [x; y]))), (fun _ -> Val, Val)
|
||||
|
||||
let sem_init s = fun x atr y ->
|
||||
ignore atr (
|
||||
match s with
|
||||
| ":" -> Sexp ("cons", [x; y])
|
||||
| ":=" -> Assign (x, y)
|
||||
| _ -> Binop (s, x, y)
|
||||
)
|
||||
let p x y =
|
||||
match s with
|
||||
| ":" -> Sexp ("cons", [x; y])
|
||||
| ":=" -> Assign (x, y)
|
||||
| _ -> Binop (s, x, y)
|
||||
in
|
||||
match x with
|
||||
Ignore x -> Ignore (p x y)
|
||||
| _ -> ignore atr (p x y)
|
||||
|
||||
(* ======= *)
|
||||
|
||||
|
|
@ -624,7 +627,7 @@ module Expr =
|
|||
)]
|
||||
)
|
||||
in
|
||||
ostap (inner[0][id][atr])
|
||||
ostap (inner[0][id][atr])
|
||||
|
||||
let atr' = atr
|
||||
let not_a_reference s = new Reason.t (Msg.make "not a reference" [||] (Msg.Locator.Point s#coord))
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
let version = "Version 1.00, 09eb6aa18, Sat Sep 12 21:05:25 2020 +0300"
|
||||
let version = "Version 1.00, d06d9a250, Mon Sep 21 21:30:08 2020 +0300"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue