Modify implicit semicolon rules
This commit is contained in:
1 parent
386f5f596d
commit
b03ce0e9b4
2 files changed
+5
-2
No files matched your search
@@ -63,7 +63,6 @@ GB_ALLOCATOR_PROC(heap_allocator_proc) {
|
|||||||
#else
|
#else
|
||||||
case gbAllocation_Alloc:
|
case gbAllocation_Alloc:
|
||||||
// TODO(bill): Make sure this is aligned correctly
|
// TODO(bill): Make sure this is aligned correctly
|
||||||
// ptr = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, align_formula_isize(size, alignment));
|
|
||||||
ptr = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, align_formula_isize(size, alignment));
|
ptr = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, align_formula_isize(size, alignment));
|
||||||
break;
|
break;
|
||||||
case gbAllocation_Free:
|
case gbAllocation_Free:
|
||||||
|
|||||||
+5
-1
@@ -1371,9 +1371,13 @@ void expect_semicolon(AstFile *f, AstNode *s) {
|
|||||||
if (is_semicolon_optional_for_node(f, s)) {
|
if (is_semicolon_optional_for_node(f, s)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} else if (f->curr_token.kind == Token_CloseBrace) {
|
} else {
|
||||||
|
switch (f->curr_token.kind) {
|
||||||
|
case Token_CloseBrace:
|
||||||
|
case Token_CloseParen:
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
String node_string = ast_node_strings[s->kind];
|
String node_string = ast_node_strings[s->kind];
|
||||||
syntax_error(prev_token, "Expected ';' after %.*s, got %.*s",
|
syntax_error(prev_token, "Expected ';' after %.*s, got %.*s",
|
||||||
LIT(node_string), LIT(token_strings[prev_token.kind]));
|
LIT(node_string), LIT(token_strings[prev_token.kind]));
|
||||||
|
|||||||
Reference in new issue
Block a user