Commit Graph

1822 Commits

Author SHA1 Message Date
ZyX
252a76db80 unittests: Free everything and check for memory leaks
Also improves error reporting.
2017-10-16 03:06:34 +03:00
ZyX
c03dc13bb7 klee: Fix possible assertion error
No idea how it did not happen to hit me yet.
2017-10-16 03:05:27 +03:00
ZyX
248493f155 test/unit/formatc: Fix parsing of most recent viml_parser_highlight 2017-10-16 03:03:34 +03:00
ZyX
15043e93b6 klee: Update key_name_entry table 2017-10-16 00:41:41 +03:00
ZyX
ed253b5fe6 klee: Include colors in test 2017-10-16 00:39:48 +03:00
ZyX
fe81380bf5 viml/parser/expressions: Highlight prefix separately from number
Should make accidental octals more visible.
2017-10-16 00:30:55 +03:00
ZyX
5e92ee6565 charset: Do not call strlen() from vim_str2nr 2017-10-16 00:19:02 +03:00
ZyX
1a3635304b charset: Avoid overflow in vim_str2nr 2017-10-16 00:07:32 +03:00
ZyX
76f0466536 Merge branch 'master' into expression-parser 2017-10-15 21:16:27 +03:00
ZyX
3aa2c0d63a viml/parser/expressions,klee: Fix some problems found by KLEE run 2017-10-15 21:11:00 +03:00
ZyX
6c19cbef26 viml/parser/expressions,tests: Add AST freeing, with sanity checks 2017-10-15 20:05:35 +03:00
ZyX
206f7ae76a unittests: Test some edge cases 2017-10-15 19:18:17 +03:00
ZyX
c286155bfa viml/parser/expressions: Create tests for latest additions 2017-10-15 19:13:52 +03:00
ZyX
8178ba2871 klee: Fix some errors made in …parser.c 2017-10-15 19:13:52 +03:00
ZyX
fa3cfc0dd5 viml/parser/expressions: Finish parser
Note: formatc.lua was unable to swallow some newer additions to ExprASTNodeType 
(specifically `kExprNodeOr = '|'` and probably something else), so all `= …` 
were dropped: in any case they only were there in order to not bother updating 
viml_pexpr_debug_print_ast_node and since it is now known all nodes which will 
be present it is not much of an issue.
2017-10-15 19:13:52 +03:00
ZyX
af38cea133 viml/parser/expressions: Add support for string parsing 2017-10-15 19:13:52 +03:00
ZyX
bd3a4166b2 viml/parser/expressions: Add support for subscript and list literals 2017-10-15 19:13:51 +03:00
ZyX
e45e519495 viml/parser/expressions: Error out on multiple colons in a row 2017-10-15 19:13:51 +03:00
ZyX
21a5ce033c viml/parser/expressions: Add support for the dot operator and numbers 2017-10-15 19:13:50 +03:00
ZyX
163792e9b9 viml/parser/expressions: Make lexer parse numbers, support non-decimal 2017-10-15 19:13:50 +03:00
ZyX
0bc4e22379 viml/parser/expressions: Forbid dot or alpha characters after a float
This is basically what Vim already does, in addition to forbidding floats should
there be a concat immediately before it.
2017-10-15 19:13:50 +03:00
ZyX
6168e1127c viml/parser/expressions: Add support for comparison operators 2017-10-15 19:13:49 +03:00
ZyX
6791c57420 viml/parser/expressions: Make sure that arrows outside lambda throw 2017-10-15 19:13:49 +03:00
ZyX
6144e26eb9 viml/parser/expressions: Add support for ternary operator 2017-10-15 19:13:49 +03:00
ZyX
9e721031d5 viml/parser/expressions: Fix determining invalid commas/colons 2017-10-15 19:13:48 +03:00
ZyX
3735537a50 viml/parser/expressions: Fix call inside nested parenthesis
It may have incorrectly tried to call everything because of essentially “value” 
nodes being treated as not such.
2017-10-15 19:13:48 +03:00
Björn Linse
4b3e51d4ee ops: save and restore clipboard batch status when entering cmdline window 2017-10-15 16:36:00 +02:00
Justin M. Keyes
c4ab110e04 health.vim: fix highlighting
`:syntax keyword` is affected by 'iskeyword'. When we aligned
'iskeyword' to that of filetype=help, colon (:) is now included.
Simplest way to deal with this is to include colon (:) in the `:syntax
keyword` directive.

Also:
- change "SUGGESTIONS" mouthful to "ADVICE"
- change "SUCCESS" to "OK"
2017-10-15 12:06:13 +02:00
James McCoy
dc513f7618
getcmdline_prompt: Temporarily disable msg_silent so prompt is displayed
vim-patch:7.4.1636
Closes #7378
2017-10-14 14:32:27 -04:00
ZyX
f265066081 unittests: Add support for dumping “expected” state
Purpose is similar to that of `screen:snapshot_util()`, but in different domain.
2017-10-08 22:25:09 +03:00
ZyX
9fa8f7fc0a viml/parser/expressions: Add a way to adjust lexer
It also adds support for kExprLexOr which for some reason was forgotten.

It was only made sure that KLEE test compiles in non-KLEE mode, not that
something works or that KLEE is able to run tests.
2017-10-08 22:25:08 +03:00
ZyX
0987d3b10f viml/parser/expressions: Make curly braces name actually work 2017-10-08 22:25:07 +03:00
ZyX
3cc65ac054 viml/parser/expressions: Make commas actually work when calling 2017-10-08 22:25:07 +03:00
ZyX
d4782fb1ca viml/parser/expressions: Make commas actually work when calling 2017-10-08 22:25:06 +03:00
ZyX
7980614650 viml/parser/expressions: Add support for figure braces (three kinds) 2017-10-08 22:25:06 +03:00
ZyX
7c97f78393 klee: Start preparing for klee tests
First stage: something compiling without klee, but with a buch of dirty
hacks - done.
Second stage: something running under klee, able to emit useful results,
but still using dirty hacks - done.

Third stage: make CMake care about clang argumnets - not done, may be
omitted if proves to be too hard. Not that klee can be run on CI in any
case.
2017-10-08 22:25:05 +03:00
ZyX
430e516d3a viml/parser/expressions: Start creating expressions parser
Currently supported nodes:

- Register as it is one of the simplest value nodes (even numbers are
  not that simple with that dot handling).
- Plus, both unary and binary.
- Parenthesis, both nesting and calling.

Note regarding unit tests: it stores data for AST in highlighting in
strings in place of tables because luassert fails to do a good job at
representing big tables. Squashing a bunch of data into a single string
simply yields more readable result.
2017-10-08 22:25:03 +03:00
Justin M. Keyes
52517321d1 test: nvim_get_hl_by_name/by_id #7082
- test all properties
- test failure modes
2017-10-08 21:17:20 +02:00
ZyX
919223c23a unittests: Move some functions into helpers modules 2017-10-08 22:12:00 +03:00
ZyX
2d8b9937de viml/parser: Handle encoding conversions 2017-10-08 22:11:59 +03:00
ZyX
0300c4d109 viml/expressions: Add lexer with some basic tests 2017-10-08 22:11:57 +03:00
Justin M. Keyes
04187a1c74 Merge #7082 'api: nvim_get_hl_by_name/by_id' 2017-10-08 19:09:14 +02:00
Justin M. Keyes
032b088c84 Merge #7364 lower priority of 'cursorline', 'cursorcolumn' 2017-10-07 19:11:05 +02:00
ckelsel
c0e45d97b0 vim-patch:8.0.0148 #7344
Problem:    When a C preprocessor statement has two line continuations the
            following line does not have the right indent. (Ken Takata)
Solution:   Add the indent of the previous continuation line. (Hirohito
            Higashi)

c6aa475a27
2017-10-07 17:10:37 +02:00
Justin M. Keyes
d1874ab282 syntax: 'cursorline': low priority #6380 2017-10-07 16:45:15 +02:00
Justin M. Keyes
6f7754dfa0 test: avoid extra clear() calls
also: various other cleanup
2017-10-02 01:46:16 +02:00
Ignas Anikevicius
e9dba214ea test/shada: fixup for Windows backslashes #7287 2017-10-02 00:48:43 +02:00
Ignas Anikevicius
2b133101cf win: vim_FullName(): force backslashes #7287
- Replace obvious cases of '/' literal with PATHSEP. (There are still
  some remaining cases that need closer inspection.)
- Fixup tests: ui/screen_basic

closes #7117
ref https://github.com/neovim/neovim/issues/2471#issuecomment-271193714
2017-10-02 00:48:30 +02:00
Matthieu Coudron
3a00648639 Changed prototypes to accept a boolean "rgb" 2017-09-30 11:43:26 +09:00
Matthieu Coudron
e3a2cca387 Increased test coverage for RGB and cterm 2017-09-30 11:43:26 +09:00