New AST
This commit is contained in:
@@ -93,8 +93,9 @@ Expr* parse_unary_expr(Parser* p) {
|
||||
else if (token_is(p, TK_OpenParen)) { // cast requires lookahead
|
||||
Token *token = token_peek(p, 1);
|
||||
if (token->kind == TK_Keyword || token->kind == TK_Identifier) {
|
||||
Type *type = type_get(p, token->intern_val);
|
||||
if(type != type_undefined){
|
||||
|
||||
AST_Node *type = symbol_lookup_type(p, token->intern_val);
|
||||
if(type){
|
||||
token_next(p);
|
||||
token_next(p);
|
||||
// @Todo(Krzosa): Parse pointer types
|
||||
@@ -105,6 +106,7 @@ Expr* parse_unary_expr(Parser* p) {
|
||||
else {
|
||||
result = parse_postfix_expr(p);
|
||||
}
|
||||
|
||||
}
|
||||
else {
|
||||
result = parse_postfix_expr(p);
|
||||
|
||||
Reference in New Issue
Block a user