Moved print from statement to builtin
This commit is contained in:
parent
408d772247
commit
8d61189a03
2 changed files with 0 additions and 9 deletions
|
|
@ -191,11 +191,6 @@ impl AsmPass {
|
||||||
return Err(self.raise(UndeclaredVariable(name.to_string())));
|
return Err(self.raise(UndeclaredVariable(name.to_string())));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// replace with function
|
|
||||||
Statement::PrintStmt { value } => {
|
|
||||||
self.compile_expression(namespace, value, symbols, registry)?;
|
|
||||||
self.emit(Print);
|
|
||||||
}
|
|
||||||
Statement::ExpressionStmt { expression } => {
|
Statement::ExpressionStmt { expression } => {
|
||||||
self.compile_expression(namespace, expression, symbols, registry)?;
|
self.compile_expression(namespace, expression, symbols, registry)?;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -848,9 +848,6 @@ pub enum Statement {
|
||||||
var_type: TokenType,
|
var_type: TokenType,
|
||||||
initializer: Expression,
|
initializer: Expression,
|
||||||
},
|
},
|
||||||
PrintStmt {
|
|
||||||
value: Expression,
|
|
||||||
},
|
|
||||||
FunctionStmt {
|
FunctionStmt {
|
||||||
function: Function,
|
function: Function,
|
||||||
},
|
},
|
||||||
|
|
@ -874,7 +871,6 @@ impl Statement {
|
||||||
match self {
|
match self {
|
||||||
Statement::ExpressionStmt { expression } => expression.line(),
|
Statement::ExpressionStmt { expression } => expression.line(),
|
||||||
Statement::VarStmt { name, .. } => name.line,
|
Statement::VarStmt { name, .. } => name.line,
|
||||||
Statement::PrintStmt { value } => value.line(),
|
|
||||||
Statement::FunctionStmt { function, .. } => function.name.line,
|
Statement::FunctionStmt { function, .. } => function.name.line,
|
||||||
Statement::ObjectStmt { name, .. } => name.line,
|
Statement::ObjectStmt { name, .. } => name.line,
|
||||||
Statement::GuardStatement { if_expr, .. } => if_expr.line(),
|
Statement::GuardStatement { if_expr, .. } => if_expr.line(),
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue