mirror of
https://github.com/neovim/neovim.git
synced 2026-07-19 07:31:35 +00:00
viml/parser/expressions,tests: Add AST freeing, with sanity checks
This commit is contained in:
@@ -358,6 +358,8 @@ format_luav = function(v, indent)
|
||||
else
|
||||
ret = ('%e'):format(v)
|
||||
end
|
||||
elseif type(v) == 'nil' then
|
||||
ret = 'nil'
|
||||
else
|
||||
print(type(v))
|
||||
-- Not implemented yet
|
||||
|
||||
@@ -92,6 +92,6 @@ int main(const int argc, const char *const *const argv,
|
||||
assert(ast.root != NULL
|
||||
|| plines[0].size == 0);
|
||||
assert(ast.root != NULL || ast.err.msg);
|
||||
// FIXME: check for AST recursiveness
|
||||
// FIXME: free memory and assert no memory leaks
|
||||
viml_pexpr_free_ast(ast);
|
||||
assert(allocated_memory == 0);
|
||||
}
|
||||
|
||||
@@ -253,6 +253,7 @@ describe('Expressions parser', function()
|
||||
end
|
||||
eq(exp_highlighting, hls)
|
||||
end
|
||||
lib.viml_pexpr_free_ast(east)
|
||||
end
|
||||
local function hl(group, str, shift)
|
||||
return function(next_col)
|
||||
|
||||
Reference in New Issue
Block a user