diff options
| author | Ginger Bill <bill@gingerbill.org> | 2017-07-17 15:08:36 +0100 |
|---|---|---|
| committer | Ginger Bill <bill@gingerbill.org> | 2017-07-17 15:08:36 +0100 |
| commit | 9a8759efefa24f5ae1e6d91b67dca72357a99ff9 (patch) | |
| tree | f0c5087618010a4fa4d85cbe019426f9c18a7ede /src/parser.cpp | |
| parent | 054948e701c1340e72ac236d58da15ca9e6d617c (diff) | |
Polymorphic type specialization for procedures
Diffstat (limited to 'src/parser.cpp')
| -rw-r--r-- | src/parser.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/parser.cpp b/src/parser.cpp index c691340a1..1b95b0cc1 100644 --- a/src/parser.cpp +++ b/src/parser.cpp @@ -2215,6 +2215,9 @@ AstNode *convert_stmt_to_body(AstFile *f, AstNode *stmt) { syntax_error(stmt, "Expected a normal statement rather than a block statement"); return stmt; } + if (stmt->kind == AstNode_EmptyStmt) { + syntax_error(stmt, "Expected a non-empty statement"); + } GB_ASSERT(is_ast_node_stmt(stmt) || is_ast_node_decl(stmt)); Token open = ast_node_token(stmt); Token close = ast_node_token(stmt); |