Dragonstone::Compiler
Inherits Dragonstone::OPC < Reference < Object
Constants
BINARY_OPCODE = {:+ => OPC::ADD, :&+ => OPC::ADD, :- => OPC::SUB, :&- => OPC::SUB, :* => OPC::MUL, :&* => OPC::MUL, :/ => OPC::DIV, :// => OPC::FLOOR_DIV, :% => OPC::MOD, :** => OPC::POW, :&** => OPC::POW, :& => OPC::BIT_AND, :| => OPC::BIT_OR, :^ => OPC::BIT_XOR, :<< => OPC::SHL, :>> => OPC::SHR, :== => OPC::EQ, :!= => OPC::NE, :< => OPC::LT, :<= => OPC::LE, :> => OPC::GT, :>= => OPC::GE, :<=> => OPC::CMP}
UNARY_OPCODE = {:+ => OPC::POS, :&+ => OPC::POS, :- => OPC::NEG, :&- => OPC::NEG, :! => OPC::NOT, :~ => OPC::BIT_NOT}
Constructors
new(name_pool : NamePool | Nil = nil)
SourceClass methods
compile(ast : AST::Program) : CompiledCode
SourceInstance methods
compile(ast : AST::Program) : CompiledCode
Source