virtual keyword parsing and ast
This commit is contained in:
@@ -36,6 +36,7 @@ keyword = {
|
||||
| "override"
|
||||
| "const"
|
||||
| "type"
|
||||
| "virtual"
|
||||
}
|
||||
|
||||
identifier = @{
|
||||
@@ -373,10 +374,12 @@ trait_decl = {
|
||||
// FUNCTIONS
|
||||
// ======================================================
|
||||
|
||||
virtual_kw = { "virtual" }
|
||||
|
||||
override_kw = { "override" ~ ("(" ~ expr_path ~ ")")? }
|
||||
|
||||
function_decl = {
|
||||
visibility? ~ ("void" | type_expr) ~ identifier ~ generics_decl? ~ "(" ~ method_args ~ ")" ~ override_kw? ~ (block | semicolon)
|
||||
visibility? ~ virtual_kw? ~ ("void" | type_expr) ~ identifier ~ generics_decl? ~ "(" ~ method_args ~ ")" ~ override_kw? ~ (block | semicolon)
|
||||
}
|
||||
|
||||
// ======================================================
|
||||
|
||||
Reference in New Issue
Block a user