projects
/
cparser
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f9b4f77
)
Improve error recovery: Produce a valid statement and continue parsing even if the...
author
Christoph Mallon
<christoph.mallon@gmx.de>
Fri, 4 Feb 2011 14:27:10 +0000
(14:27 +0000)
committer
Christoph Mallon
<christoph.mallon@gmx.de>
Fri, 4 Feb 2011 14:27:10 +0000
(14:27 +0000)
[r28294]
parser.c
patch
|
blob
|
history
diff --git
a/parser.c
b/parser.c
index
ce395fd
..
8b14bbf
100644
(file)
--- a/
parser.c
+++ b/
parser.c
@@
-9375,6
+9375,8
@@
static statement_t *parse_default_statement(void)
PUSH_PARENT(statement);
expect(':', end_error);
+end_error:
+
if (current_switch != NULL) {
const case_label_statement_t *def_label = current_switch->default_label;
if (def_label != NULL) {
@@
-9404,9
+9406,6
@@
static statement_t *parse_default_statement(void)
POP_PARENT;
return statement;
-end_error:
- POP_PARENT;
- return create_invalid_statement();
}
/**