Parsed - Fixed class parser
This commit is contained in:
parent
af68acde70
commit
7306fa0cfa
1 changed files with 1 additions and 1 deletions
|
@ -228,7 +228,7 @@ impl Parser {
|
|||
// Read the body
|
||||
self.consume(&TokenType::LeftBrace, "'{' expected")?;
|
||||
let mut methods = Vec::new();
|
||||
while !self.check(&TokenType::LeftBrace) && !self.is_at_end() {
|
||||
while !self.check(&TokenType::RightBrace) && !self.is_at_end() {
|
||||
match self.parse_function(FunctionKind::Method)? {
|
||||
StmtNode::FunDecl(d) => methods.push(d),
|
||||
_ => panic!("Function declaration expected"),
|
||||
|
|
Loading…
Reference in a new issue