This commit is contained in:
Ivan Bondarev 2021-02-09 07:15:54 +01:00
parent fbf11aea9a
commit 8aecd3bb6b

View file

@ -329,7 +329,7 @@ namespace SyntaxVisitors.PatternsVisitors
var stl = stat.Parent as statement_list;
if (stl != null)
stl.ReplaceInList(stat, l);
else
else if (stat is var_statement)
throw new SyntaxVisitorError("EMBEDDED_STATEMENT_CANNOT_BE_A_DECLARATION", stat.source_context);
}
//}