mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
viml/parser/expressions: Fix memory leak when processing ternary
This commit is contained in:
parent
248493f155
commit
4c8ed65b60
@ -2308,10 +2308,10 @@ viml_pexpr_parse_invalid_colon:
|
||||
_("E15: Colon outside of dictionary or ternary operator: %.*s"));
|
||||
viml_pexpr_parse_valid_colon:
|
||||
ADD_VALUE_IF_MISSING(_(EXP_VAL_COLON));
|
||||
NEW_NODE_WITH_CUR_POS(cur_node, kExprNodeColon);
|
||||
if (is_ternary) {
|
||||
HL_CUR_TOKEN(TernaryColon);
|
||||
} else {
|
||||
NEW_NODE_WITH_CUR_POS(cur_node, kExprNodeColon);
|
||||
ADD_OP_NODE(cur_node);
|
||||
HL_CUR_TOKEN(Colon);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user