[fine] starting to work on methods
This commit is contained in:
parent
fde5579479
commit
0d48bfb113
4 changed files with 22 additions and 8 deletions
|
|
@ -53,7 +53,7 @@ pub enum TokenKind {
|
|||
Or,
|
||||
Return,
|
||||
Select,
|
||||
This,
|
||||
Selff,
|
||||
True,
|
||||
While,
|
||||
Yield,
|
||||
|
|
@ -322,11 +322,11 @@ impl<'a> Tokens<'a> {
|
|||
if ident == "select" {
|
||||
return TokenKind::Select;
|
||||
}
|
||||
if ident == "self" {
|
||||
return TokenKind::Selff;
|
||||
}
|
||||
}
|
||||
't' => {
|
||||
if ident == "this" {
|
||||
return TokenKind::This;
|
||||
}
|
||||
if ident == "true" {
|
||||
return TokenKind::True;
|
||||
}
|
||||
|
|
@ -579,14 +579,14 @@ mod tests {
|
|||
|
||||
test_tokens!(
|
||||
more_keywords,
|
||||
"fun if import let return select this true while truewhile new",
|
||||
"fun if import let return select self true while truewhile new",
|
||||
(0, Fun, "fun"),
|
||||
(4, If, "if"),
|
||||
(7, Import, "import"),
|
||||
(14, Let, "let"),
|
||||
(18, Return, "return"),
|
||||
(25, Select, "select"),
|
||||
(32, This, "this"),
|
||||
(32, Selff, "self"),
|
||||
(37, True, "true"),
|
||||
(42, While, "while"),
|
||||
(48, Identifier, "truewhile"),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue