add print builtin function
This commit is contained in:
@@ -64,6 +64,7 @@ pub(crate) enum Op {
|
||||
FloatCast,
|
||||
BoolCast,
|
||||
StringCast,
|
||||
Print,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
@@ -121,6 +122,9 @@ impl Token {
|
||||
"bool" => Ok(Token::Operator(Op::BoolCast)),
|
||||
"string" => Ok(Token::Operator(Op::StringCast)),
|
||||
|
||||
// misc
|
||||
"print" => Ok(Token::Operator(Op::Print)),
|
||||
|
||||
// then variable length keywords
|
||||
_ => {
|
||||
if s.starts_with(":") {
|
||||
|
||||
Reference in New Issue
Block a user