mirror of
https://github.com/luau-lang/luau.git
synced 2024-11-15 22:35:43 +08:00
7f867ac166
Adds number support to the prototype. Binary operators are next.
17 lines
388 B
Agda
17 lines
388 B
Agda
module Luau.Value where
|
|
|
|
open import Agda.Builtin.Float using (Float)
|
|
open import Luau.Addr using (Addr)
|
|
open import Luau.Syntax using (Block; Expr; nil; addr; number)
|
|
open import Luau.Var using (Var)
|
|
|
|
data Value : Set where
|
|
nil : Value
|
|
addr : Addr → Value
|
|
number : Float → Value
|
|
|
|
val : ∀ {a} → Value → Expr a
|
|
val nil = nil
|
|
val (addr a) = addr a
|
|
val (number x) = number x
|