token: Remove and and or tokens, since they clash with operator overload function names
This commit is contained in:
@@ -289,7 +289,6 @@ impl<'t> Lexer<'t> {
|
|||||||
let token = self.produce(TKind::Identifier);
|
let token = self.produce(TKind::Identifier);
|
||||||
Ok(Token {
|
Ok(Token {
|
||||||
kind: match lexeme {
|
kind: match lexeme {
|
||||||
"and" => TKind::And,
|
|
||||||
"as" => TKind::As,
|
"as" => TKind::As,
|
||||||
"break" => TKind::Break,
|
"break" => TKind::Break,
|
||||||
"const" => TKind::Const,
|
"const" => TKind::Const,
|
||||||
@@ -308,7 +307,6 @@ impl<'t> Lexer<'t> {
|
|||||||
"match" => TKind::Match,
|
"match" => TKind::Match,
|
||||||
"mod" => TKind::Module,
|
"mod" => TKind::Module,
|
||||||
"mut" => TKind::Mut,
|
"mut" => TKind::Mut,
|
||||||
"or" => TKind::Or,
|
|
||||||
"pub" => TKind::Public,
|
"pub" => TKind::Public,
|
||||||
"return" => TKind::Return,
|
"return" => TKind::Return,
|
||||||
"static" => TKind::Static,
|
"static" => TKind::Static,
|
||||||
|
|||||||
@@ -64,7 +64,6 @@ pub enum TKind {
|
|||||||
Comment, // Line or block comment
|
Comment, // Line or block comment
|
||||||
Doc, // Doc comment
|
Doc, // Doc comment
|
||||||
|
|
||||||
And,
|
|
||||||
As,
|
As,
|
||||||
Break,
|
Break,
|
||||||
Const,
|
Const,
|
||||||
@@ -83,7 +82,6 @@ pub enum TKind {
|
|||||||
Match,
|
Match,
|
||||||
Module,
|
Module,
|
||||||
Mut,
|
Mut,
|
||||||
Or,
|
|
||||||
Public,
|
Public,
|
||||||
Return,
|
Return,
|
||||||
Static,
|
Static,
|
||||||
|
|||||||
Reference in New Issue
Block a user