Start refactoring how builtins work

Create an enum of builtin operations to start with
This commit is contained in:
greg 2019-08-12 13:10:22 -07:00
parent e750247134
commit bfb36b90e4

View File

@ -4,6 +4,33 @@ use std::collections::HashMap;
use crate::tokenizing::TokenKind;
use crate::typechecking::{TypeConst, Type};
#[derive(Debug)]
enum Builtin {
Add,
Subtract,
Negate,
Multiply,
Divide,
Quotient,
Modulo,
Exponentiation,
BitwiseAnd,
BitwiseOr,
BooleanAnd,
BooleanOr,
BooleanNot,
Equality,
LessThan,
LessThanEquals,
GreaterThan,
GreaterThanEquals,
Comparison,
FieldAccess,
IOPrint,
IOPrintLn,
IOGetLine,
}
#[derive(Debug, PartialEq, Clone)]
pub struct BinOp {
sigil: Rc<String>