s/consume/consumeSingle

This commit is contained in:
Luna 2019-08-26 20:23:11 -03:00
parent 5f8d9da6fa
commit a72346b888
2 changed files with 6 additions and 6 deletions

View File

@ -53,4 +53,4 @@ fn main(a int) int {
v()()()
}
fn voidfunc() {}
fn (v Typ) voidfunc() {}

View File

@ -392,19 +392,19 @@ pub const Parser = struct {
_ = try self.consumeSingle(.Fn);
if (self.check(.LeftParen)) {
_ = try self.consume(.LeftParen);
_ = try self.consumeSingle(.LeftParen);
var mutable_ref: bool = false;
const method_var = try self.consume(.Identifier);
const method_var = try self.consumeSingle(.Identifier);
if (self.check(.Mut)) {
_ = try self.consume(.Mut);
_ = try self.consumeSingle(.Mut);
mutable_ref = true;
}
const method_typ = try self.consume(.Identifier);
const method_typ = try self.consumeSingle(.Identifier);
_ = try self.consume(.RightParen);
_ = try self.consumeSingle(.RightParen);
}
const name = try self.consumeSingle(.Identifier);