diff options
author | alaviss <alaviss@users.noreply.github.com> | 2019-02-07 23:08:15 +0700 |
---|---|---|
committer | Miran <narimiran@disroot.org> | 2019-02-07 17:08:15 +0100 |
commit | 2fdf816332d48f55719c5709477756e872daab0d (patch) | |
tree | e5ec3c53d529f72d807e79fde98bd55a7fe2a03c /nimsuggest/tests/tsi_highlight.nim | |
parent | 29fbf111a878db0ff095f8046a4de9e0f851d466 (diff) | |
download | Nim-2fdf816332d48f55719c5709477756e872daab0d.tar.gz |
compiler/[msgs, suggest]: improve highlighter accuracy (#10496)
Previously the compiler would generate suggestions based on the symbol identifier length, but that might not reflect the actual representation of it within the actual source code. This commit implements a simple source scanner for the suggest module to address the problem outlined above. Fixes nim-lang/nimsuggest#24
Diffstat (limited to 'nimsuggest/tests/tsi_highlight.nim')
-rw-r--r-- | nimsuggest/tests/tsi_highlight.nim | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/nimsuggest/tests/tsi_highlight.nim b/nimsuggest/tests/tsi_highlight.nim new file mode 100644 index 000000000..2c19582cc --- /dev/null +++ b/nimsuggest/tests/tsi_highlight.nim @@ -0,0 +1,11 @@ +proc a: int = 0 +e_c_h_o#[!]# + +discard """ +$nimsuggest --tester $file +>highlight $1 +highlight;;skProc;;1;;5;;1 +highlight;;skType;;1;;8;;3 +highlight;;skResult;;1;;0;;0 +highlight;;skProc;;2;;0;;7 +""" |