[fine] test compilation, start removing print
This commit is contained in:
parent
d8db65af55
commit
d8988cb2cf
8 changed files with 239 additions and 81 deletions
|
|
@ -49,7 +49,6 @@ pub enum TokenKind {
|
|||
Import,
|
||||
Let,
|
||||
Or,
|
||||
Print,
|
||||
Return,
|
||||
Select,
|
||||
This,
|
||||
|
|
@ -304,11 +303,6 @@ impl<'a> Tokens<'a> {
|
|||
return TokenKind::Or;
|
||||
}
|
||||
}
|
||||
'p' => {
|
||||
if ident == "print" {
|
||||
return TokenKind::Print;
|
||||
}
|
||||
}
|
||||
'r' => {
|
||||
if ident == "return" {
|
||||
return TokenKind::Return;
|
||||
|
|
@ -575,18 +569,17 @@ mod tests {
|
|||
|
||||
test_tokens!(
|
||||
more_keywords,
|
||||
"fun if import let print return select this true while truewhile",
|
||||
"fun if import let return select this true while truewhile",
|
||||
(0, Fun, "fun"),
|
||||
(4, If, "if"),
|
||||
(7, Import, "import"),
|
||||
(14, Let, "let"),
|
||||
(18, Print, "print"),
|
||||
(24, Return, "return"),
|
||||
(31, Select, "select"),
|
||||
(38, This, "this"),
|
||||
(43, True, "true"),
|
||||
(48, While, "while"),
|
||||
(54, Identifier, "truewhile")
|
||||
(18, Return, "return"),
|
||||
(25, Select, "select"),
|
||||
(32, This, "this"),
|
||||
(37, True, "true"),
|
||||
(42, While, "while"),
|
||||
(48, Identifier, "truewhile")
|
||||
);
|
||||
|
||||
test_tokens!(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue