break;
}
- if (expr == null) {
- // workaround for current limitation of exception handling
- throw new ParseError.SYNTAX ("syntax error in primary expression");
- }
-
// process primary expressions that start with an inner primary expression
bool found = true;
while (found) {
found = false;
break;
}
-
- if (expr == null) {
- // workaround for current limitation of exception handling
- throw new ParseError.SYNTAX ("syntax error in primary expression");
- }
}
return expr;
next ();
var rhs = parse_expression ();
expr = new Assignment (expr, rhs, operator, get_src (begin));
- if (expr == null) {
- // workaround for current limitation of exception handling
- throw new ParseError.SYNTAX ("syntax error in assignment");
- }
} else if (current () == TokenType.OP_GT) { // >>=
char* first_gt_pos = tokens[index].begin.pos;
next ();
next ();
var rhs = parse_expression ();
expr = new Assignment (expr, rhs, AssignmentOperator.SHIFT_RIGHT, get_src (begin));
- if (expr == null) {
- // workaround for current limitation of exception handling
- throw new ParseError.SYNTAX ("syntax error in assignment");
- }
} else {
prev ();
break;
}
if (!is_decl) {
- if (stmt == null) {
- // workaround for current limitation of exception handling
- throw new ParseError.SYNTAX ("syntax error in statement");
- }
block.add_statement (stmt);
}
} catch (ParseError e) {
comment = scanner.pop_comment ();
var block = new Block (get_src_com (get_location ()));
- var stmt = parse_embedded_statement_without_block ();
- if (stmt == null) {
- // workaround for current limitation of exception handling
- throw new ParseError.SYNTAX ("syntax error in embedded statement");
- }
- block.add_statement (stmt);
+ block.add_statement (parse_embedded_statement_without_block ());
return block;
}
ns.add_field (field);
} else if (sym is Constant) {
ns.add_constant ((Constant) sym);
- } else if (sym == null) {
- // workaround for current limitation of exception handling
- throw new ParseError.SYNTAX ("syntax error in declaration");
} else {
Report.error (sym.source_reference, "unexpected declaration in namespace");
}
}
} else if (sym is Destructor) {
cl.destructor = (Destructor) sym;
- } else if (sym == null) {
- // workaround for current limitation of exception handling
- throw new ParseError.SYNTAX ("syntax error in declaration");
} else {
Report.error (sym.source_reference, "unexpected declaration in class");
}
st.add_field ((Field) sym);
} else if (sym is Constant) {
st.add_constant ((Constant) sym);
- } else if (sym == null) {
- // workaround for current limitation of exception handling
- throw new ParseError.SYNTAX ("syntax error in declaration");
} else {
Report.error (sym.source_reference, "unexpected declaration in struct");
}
iface.add_field ((Field) sym);
} else if (sym is Property) {
iface.add_property ((Property) sym);
- } else if (sym == null) {
- // workaround for current limitation of exception handling
- throw new ParseError.SYNTAX ("syntax error in declaration");
} else {
Report.error (sym.source_reference, "unexpected declaration in interface");
}
return flags;
}
}
- return flags;
}
ModifierFlags parse_member_declaration_modifiers () {
return flags;
}
}
- return flags;
}
FormalParameter parse_parameter () throws ParseError {
break;
}
- if (expr == null) {
- // workaround for current limitation of exception handling
- throw new ParseError.SYNTAX ("syntax error in primary expression");
- }
-
// process primary expressions that start with an inner primary expression
bool found = true;
while (found) {
found = false;
break;
}
-
- if (expr == null) {
- // workaround for current limitation of exception handling
- throw new ParseError.SYNTAX ("syntax error in primary expression");
- }
}
return expr;
next ();
var rhs = parse_expression ();
expr = new Assignment (expr, rhs, operator, get_src (begin));
- if (expr == null) {
- // workaround for current limitation of exception handling
- throw new ParseError.SYNTAX ("syntax error in assignment");
- }
} else if (current () == TokenType.OP_GT) { // >>=
char* first_gt_pos = tokens[index].begin.pos;
next ();
next ();
var rhs = parse_expression ();
expr = new Assignment (expr, rhs, AssignmentOperator.SHIFT_RIGHT, get_src (begin));
- if (expr == null) {
- // workaround for current limitation of exception handling
- throw new ParseError.SYNTAX ("syntax error in assignment");
- }
} else {
prev ();
break;
}
if (!is_decl) {
- if (stmt == null) {
- // workaround for current limitation of exception handling
- throw new ParseError.SYNTAX ("syntax error in statement");
- }
block.add_statement (stmt);
}
} catch (ParseError e) {
comment = scanner.pop_comment ();
var block = new Block (get_src_com (get_location ()));
- var stmt = parse_embedded_statement_without_block ();
- if (stmt == null) {
- // workaround for current limitation of exception handling
- throw new ParseError.SYNTAX ("syntax error in embedded statement");
- }
- block.add_statement (stmt);
+ block.add_statement (parse_embedded_statement_without_block ());
return block;
}
is_expr = true;
break;
default:
- // workaround for current limitation of exception handling
- bool local_is_expr = is_expression ();
- is_expr = local_is_expr;
+ is_expr = is_expression ();
break;
}
ns.add_field (field);
} else if (sym is Constant) {
ns.add_constant ((Constant) sym);
- } else if (sym == null) {
- // workaround for current limitation of exception handling
- throw new ParseError.SYNTAX ("syntax error in declaration");
} else {
Report.error (sym.source_reference, "unexpected declaration in namespace");
}
}
} else if (sym is Destructor) {
cl.destructor = (Destructor) sym;
- } else if (sym == null) {
- // workaround for current limitation of exception handling
- throw new ParseError.SYNTAX ("syntax error in declaration");
} else {
Report.error (sym.source_reference, "unexpected declaration in class");
}
st.add_field ((Field) sym);
} else if (sym is Constant) {
st.add_constant ((Constant) sym);
- } else if (sym == null) {
- // workaround for current limitation of exception handling
- throw new ParseError.SYNTAX ("syntax error in declaration");
} else {
Report.error (sym.source_reference, "unexpected declaration in struct");
}
iface.add_field ((Field) sym);
} else if (sym is Property) {
iface.add_property ((Property) sym);
- } else if (sym == null) {
- // workaround for current limitation of exception handling
- throw new ParseError.SYNTAX ("syntax error in declaration");
} else {
Report.error (sym.source_reference, "unexpected declaration in interface");
}
var member_sym = parse_declaration ();
if (member_sym is Method) {
en.add_method ((Method) member_sym);
- } else if (member_sym == null) {
- // workaround for current limitation of exception handling
- throw new ParseError.SYNTAX ("syntax error in declaration");
} else {
Report.error (member_sym.source_reference, "unexpected declaration in enum");
}
var member_sym = parse_declaration ();
if (member_sym is Method) {
ed.add_method ((Method) member_sym);
- } else if (member_sym == null) {
- // workaround for current limitation of exception handling
- throw new ParseError.SYNTAX ("syntax error in declaration");
} else {
Report.error (member_sym.source_reference, "unexpected declaration in errordomain");
}
return flags;
}
}
- return flags;
}
ModifierFlags parse_member_declaration_modifiers () {
return flags;
}
}
- return flags;
}
FormalParameter parse_parameter () throws ParseError {