summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Hodge <tpg@ucc.asn.au>2017-08-19 11:32:08 +0800
committerJohn Hodge <tpg@ucc.asn.au>2017-08-19 11:32:08 +0800
commit9d683a9b23fb30a6b08cb85b29135960f88d2721 (patch)
treeecaf7102dcde04051eba26b6f43d488af38a45e9
parent94ba7c6e3e50ca1ab71f7ffe8637cdd1705102d5 (diff)
downloadmrust-9d683a9b23fb30a6b08cb85b29135960f88d2721.tar.gz
Parse Expr - Handle EOF after return/continue/break
-rw-r--r--src/parse/expr.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/parse/expr.cpp b/src/parse/expr.cpp
index 788a68f5..e0529155 100644
--- a/src/parse/expr.cpp
+++ b/src/parse/expr.cpp
@@ -494,6 +494,7 @@ ExprNodeP Parse_Stmt(TokenStream& lex)
ExprNodeP val;
switch(LOOK_AHEAD(lex))
{
+ case TOK_EOF:
case TOK_SEMICOLON:
case TOK_COMMA:
case TOK_BRACE_CLOSE:
@@ -525,6 +526,7 @@ ExprNodeP Parse_Stmt(TokenStream& lex)
ExprNodeP val;
switch(tok.type())
{
+ case TOK_EOF:
case TOK_SEMICOLON:
case TOK_COMMA:
case TOK_BRACE_OPEN: