Fix: future ambiguities via !keyword
This commit is contained in:
@@ -5,8 +5,6 @@ pub mod logger;
|
|||||||
pub mod event;
|
pub mod event;
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
Vec<String> args = env::args().collect();
|
|
||||||
|
|
||||||
var mut app_instance = new app::Application("mist-app");
|
var mut app_instance = new app::Application("mist-app");
|
||||||
|
|
||||||
// greeting::register(&mut app_instance);
|
// greeting::register(&mut app_instance);
|
||||||
|
|||||||
+26
-1
@@ -9,7 +9,32 @@ COMMENT = _{ "//" ~ (!"\n" ~ ANY)* }
|
|||||||
// PRIMITIVES
|
// PRIMITIVES
|
||||||
// ------------------------------------------------------
|
// ------------------------------------------------------
|
||||||
|
|
||||||
identifier = @{ (ASCII_ALPHA | "_") ~ (ASCII_ALPHANUMERIC | "_")* }
|
keyword = {
|
||||||
|
"if"
|
||||||
|
| "else"
|
||||||
|
| "for"
|
||||||
|
| "while"
|
||||||
|
| "match"
|
||||||
|
| "return"
|
||||||
|
| "break"
|
||||||
|
| "continue"
|
||||||
|
| "struct"
|
||||||
|
| "enum"
|
||||||
|
| "class"
|
||||||
|
| "trait"
|
||||||
|
| "impl"
|
||||||
|
| "pub"
|
||||||
|
| "mut"
|
||||||
|
| "var"
|
||||||
|
| "true"
|
||||||
|
| "false"
|
||||||
|
| "dyn"
|
||||||
|
| "self"
|
||||||
|
}
|
||||||
|
|
||||||
|
identifier = @{
|
||||||
|
!keyword ~ (ASCII_ALPHA | "_") ~ (ASCII_ALPHANUMERIC | "_")*
|
||||||
|
}
|
||||||
|
|
||||||
integer = @{ ASCII_DIGIT+ }
|
integer = @{ ASCII_DIGIT+ }
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user