blob: 4b12745c9c3e8e017dd7e253920453f63f269397 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
(defpackage #:sarcasm.ast
(:use #:cl #:sarcasm.types)
(:import-from #:sarcasm.util #:def/class)
(:local-nicknames
(#:a #:alexandria-2)
(#:util #:sarcasm.util)
(#:instr #:sarcasm.instr)))
(in-package #:sarcasm.ast)
;;; MODULE-STRUCTURES
(def/class func ()
(type :prefix :type typeidx)
(locals :type (vector valtype))
(body :prefix :type expr))
;;; MODULES
(def/class module ()
(types funcs tables mems globals elems datas imports exports
:type vector :initform (vector))
(start :type (or null t) ; TODO: what is this value type?
:initform nil))
|