This repository has been archived on 2020-07-05. You can view files and clone it, but cannot push or open issues or pull requests.
zurihac2020/hw09/src/AST.hs

11 lines
295 B
Haskell

module AST where
-- A variable in a function, like 'x' or 'y'
newtype Variable = Var String
-- The instructions in out IJVM AST
data Instruction = IADD | ISUB | IMUL | IDIV | IEXP | INEG | BIPUSH Int | ILOAD Variable
-- The program is just a list of instructions
type Program = [Instruction]