mirror of
https://github.com/ProgramSnail/Lama.git
synced 2025-12-29 18:18:21 +00:00
StringVal as a builtin .string
This commit is contained in:
parent
9caee0c526
commit
3cd95f8b5f
4 changed files with 160 additions and 26 deletions
|
|
@ -183,6 +183,7 @@ let compile (defs, p) =
|
|||
| Expr.Sexp (t, xs) -> List.flatten (List.map expr xs) @ [SEXP (t, List.length xs)]
|
||||
| Expr.Elem (a, i) -> expr a @ expr i @ [CALL (".elem", 2, false)]
|
||||
| Expr.Length e -> expr e @ [CALL (".length", 1, false)]
|
||||
| Expr.StringVal e -> expr e @ [CALL (".stringval", 1, false)]
|
||||
in
|
||||
let rec compile_stmt l env = function
|
||||
| Stmt.Assign (x, [], e) -> env, false, expr e @ [ST x]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue