mirror of
https://github.com/ProgramSnail/Lama.git
synced 2025-12-06 06:48:48 +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 s = (fun x atr y -> ignore atr (Call (Var s, [x; y]))), (fun _ -> Val, Val)
|
||||||
|
|
||||||
let sem_init s = fun x atr y ->
|
let sem_init s = fun x atr y ->
|
||||||
ignore atr (
|
let p x y =
|
||||||
match s with
|
match s with
|
||||||
| ":" -> Sexp ("cons", [x; y])
|
| ":" -> Sexp ("cons", [x; y])
|
||||||
| ":=" -> Assign (x, y)
|
| ":=" -> Assign (x, y)
|
||||||
| _ -> Binop (s, x, y)
|
| _ -> Binop (s, x, y)
|
||||||
)
|
in
|
||||||
|
match x with
|
||||||
|
Ignore x -> Ignore (p x y)
|
||||||
|
| _ -> ignore atr (p x y)
|
||||||
|
|
||||||
(* ======= *)
|
(* ======= *)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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