mirror of
https://github.com/luau-lang/luau.git
synced 2025-05-04 10:33:46 +01:00
27 lines
531 B
Agda
27 lines
531 B
Agda
module Luau.Syntax where
|
||
|
||
open import Agda.Builtin.String using (String)
|
||
|
||
data Type : Set where
|
||
nil : Type
|
||
_⇒_ : Type → Type → Type
|
||
none : Type
|
||
any : Type
|
||
_∪_ : Type → Type → Type
|
||
_∩_ : Type → Type → Type
|
||
|
||
Var : Set
|
||
Var = String
|
||
|
||
data Block : Set
|
||
data Expr : Set
|
||
|
||
data Block where
|
||
function_⟨_⟩_end_ : Var → Block → Block → Block
|
||
local_←_∙_ : Var → Expr → Block → Block
|
||
return : Expr → Block
|
||
|
||
data Expr where
|
||
nil : Expr
|
||
var : Var → Expr
|
||
_$_ : Expr → Expr → Expr
|