Parser - Accomodate AST class structure changes
This commit is contained in:
parent
366ba6e307
commit
71a58c12a2
1 changed files with 7 additions and 7 deletions
|
@ -2,8 +2,8 @@ use std::collections::HashSet;
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
ast::{
|
ast::{
|
||||||
BinaryExpr, ClassDecl, ClassMemberDecl, ExprNode, FunDecl, GetExpr, ProgramNode, SetExpr,
|
BinaryExpr, ClassDecl, ClassMemberDecl, ClassMemberKind, ExprNode, FunDecl, GetExpr,
|
||||||
StmtNode, VariableExpr,
|
ProgramNode, SetExpr, StmtNode, VariableExpr,
|
||||||
},
|
},
|
||||||
errors::{ErrorHandler, ErrorKind, SloxError, SloxResult},
|
errors::{ErrorHandler, ErrorKind, SloxError, SloxResult},
|
||||||
tokens::{Token, TokenType},
|
tokens::{Token, TokenType},
|
||||||
|
@ -238,11 +238,11 @@ impl Parser {
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
members.push(if static_token.is_some() {
|
members.push(ClassMemberDecl {
|
||||||
ClassMemberDecl::StaticMethod(d)
|
kind: ClassMemberKind::Method,
|
||||||
} else {
|
is_static: static_token.is_some(),
|
||||||
ClassMemberDecl::Method(d)
|
fun_decl: d,
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
_ => panic!("Function declaration expected"),
|
_ => panic!("Function declaration expected"),
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue