Minor fixes

This commit is contained in:
gingerBill
2018-09-24 10:22:22 +01:00
parent 9f3e42e4ef
commit 597fb452b1
4 changed files with 8 additions and 3 deletions
+2
View File
@@ -1024,6 +1024,7 @@ void check_proc_body(CheckerContext *ctx_, Token token, DeclInfo *decl, Type *ty
}
ast_node(bs, BlockStmt, body);
// check_open_scope(ctx, body);
check_stmt_list(ctx, bs->stmts, Stmt_CheckScopeDecls);
if (type->Proc.result_count > 0) {
if (!check_is_terminating(body)) {
@@ -1035,6 +1036,7 @@ void check_proc_body(CheckerContext *ctx_, Token token, DeclInfo *decl, Type *ty
}
}
}
// check_close_scope(ctx);
check_scope_usage(ctx->checker, ctx->scope);
+1 -1
View File
@@ -1337,7 +1337,7 @@ void check_stmt_internal(CheckerContext *ctx, Ast *node, u32 flags) {
}
Type *type = x.type;
if (!is_type_integer(type) && !is_type_float(type) && !is_type_pointer(type)) {
if (!is_type_integer(type) && !is_type_float(type) && !is_type_pointer(type) && !is_type_enum(type)) {
error(ie->op, "Only numerical and pointer types are allowed within interval expressions");
goto skip_expr;
}
+1 -1
View File
@@ -76,7 +76,7 @@ TOKEN_KIND(Token__ComparisonEnd, ""), \
TOKEN_KIND(Token_Semicolon, ";"), \
TOKEN_KIND(Token_Period, "."), \
TOKEN_KIND(Token_Comma, ","), \
TOKEN_KIND(Token_Ellipsis, ".."), \
TOKEN_KIND(Token_Ellipsis, ".."), \
TOKEN_KIND(Token_BackSlash, "\\"), \
TOKEN_KIND(Token__OperatorEnd, ""), \
\