parser: add incomplete parsing of method functions
This commit is contained in:
parent
e2f7343242
commit
5f8d9da6fa
1 changed files with 17 additions and 0 deletions
|
@ -390,6 +390,23 @@ pub const Parser = struct {
|
||||||
errdefer param_list.deinit();
|
errdefer param_list.deinit();
|
||||||
|
|
||||||
_ = try self.consumeSingle(.Fn);
|
_ = try self.consumeSingle(.Fn);
|
||||||
|
|
||||||
|
if (self.check(.LeftParen)) {
|
||||||
|
_ = try self.consume(.LeftParen);
|
||||||
|
|
||||||
|
var mutable_ref: bool = false;
|
||||||
|
const method_var = try self.consume(.Identifier);
|
||||||
|
|
||||||
|
if (self.check(.Mut)) {
|
||||||
|
_ = try self.consume(.Mut);
|
||||||
|
mutable_ref = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
const method_typ = try self.consume(.Identifier);
|
||||||
|
|
||||||
|
_ = try self.consume(.RightParen);
|
||||||
|
}
|
||||||
|
|
||||||
const name = try self.consumeSingle(.Identifier);
|
const name = try self.consumeSingle(.Identifier);
|
||||||
|
|
||||||
_ = try self.consumeSingle(.LeftParen);
|
_ = try self.consumeSingle(.LeftParen);
|
||||||
|
|
Loading…
Reference in a new issue