viml/parser/expressions: Error out on multiple colons in a row

This commit is contained in:
ZyX
2017-10-08 01:19:58 +03:00
parent 21a5ce033c
commit e45e519495
2 changed files with 76 additions and 1 deletions

View File

@@ -1691,8 +1691,10 @@ viml_pexpr_parse_invalid_comma:
SELECT_FIGURE_BRACE_TYPE(*eastnode_p, DictLiteral, Dict);
break;
} else if (eastnode_type == kExprNodeDictLiteral
|| eastnode_type == kExprNodeComma) {
|| eastnode_type == kExprNodeSubscript) {
break;
} else if (eastnode_type == kExprNodeColon) {
goto viml_pexpr_parse_invalid_colon;
} else if (eastnode_lvl >= kEOpLvlTernaryValue) {
// Do nothing
} else if (eastnode_lvl > kEOpLvlComma) {