Dmitry Boulytchev 2020-09-21 23:46:13 +03:00
parent d06d9a2506
commit 4c736914d4
5 changed files with 20 additions and 8 deletions

View file

@ -0,0 +1 @@
> 0

1
regression/test107.input Normal file
View file

@ -0,0 +1 @@
5

7
regression/test107.lama Normal file
View file

@ -0,0 +1,7 @@
local n = read ();
case 0 of
0 -> 0 + 0 + 0
esac;
write (0)

View file

@ -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))

View file

@ -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"