mirror of
https://github.com/neovim/neovim.git
synced 2025-10-09 19:36:40 +00:00
viml/parser/expressions: Fix last error found by KLEE
This commit is contained in:
@@ -2445,6 +2445,7 @@ viml_pexpr_parse_bracket_closing_error:
|
|||||||
cur_node->children = *top_node_p;
|
cur_node->children = *top_node_p;
|
||||||
}
|
}
|
||||||
*top_node_p = cur_node;
|
*top_node_p = cur_node;
|
||||||
|
new_top_node_p = top_node_p;
|
||||||
goto viml_pexpr_parse_figure_brace_closing_error;
|
goto viml_pexpr_parse_figure_brace_closing_error;
|
||||||
}
|
}
|
||||||
if (want_node == kENodeValue) {
|
if (want_node == kENodeValue) {
|
||||||
|
@@ -7120,7 +7120,25 @@ describe('Expressions parser', function()
|
|||||||
hl('InvalidDoubleQuotedString', '"'),
|
hl('InvalidDoubleQuotedString', '"'),
|
||||||
hl('InvalidDoubleQuotedEscape', '\\1'),
|
hl('InvalidDoubleQuotedEscape', '\\1'),
|
||||||
})
|
})
|
||||||
check_parsing('}l')
|
check_parsing('}l', 0, {
|
||||||
|
-- 01
|
||||||
|
ast = {
|
||||||
|
{
|
||||||
|
'OpMissing:0:1:',
|
||||||
|
children = {
|
||||||
|
'UnknownFigure(---):0:0:',
|
||||||
|
'PlainIdentifier(scope=0,ident=l):0:1:l',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
err = {
|
||||||
|
arg = '}l',
|
||||||
|
msg = 'E15: Unexpected closing figure brace: %.*s',
|
||||||
|
},
|
||||||
|
}, {
|
||||||
|
hl('InvalidFigureBrace', '}'),
|
||||||
|
hl('InvalidIdentifier', 'l'),
|
||||||
|
})
|
||||||
check_parsing(':?\000\000\000\000\000\000\000', 0, {
|
check_parsing(':?\000\000\000\000\000\000\000', 0, {
|
||||||
ast = {
|
ast = {
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user