Commit Graph

285 Commits

Author SHA1 Message Date
Meghan Denny
0406f7cc93 ensure uN and iN types are clamped to 0-65535 2021-09-30 18:46:35 -07:00
Meghan Denny
50022e5d24 analysis- clean up isTypeIdent 2021-09-30 18:46:14 -07:00
Meghan Denny
9e0f201283 finish rename of usage of std.zig.Ast 2021-09-30 18:44:06 -07:00
Meghan Denny
ad8d75b613 use single line method signatures 2021-09-30 17:51:51 -07:00
Meghan Denny
f482950f5f fix imports to use ./ for relative usage 2021-09-30 17:48:40 -07:00
Travis Staloch
50aa71c10f support new ast token changes
- some ast token tags were renamed: ie .bit_shift_left => .shl
- add initial support for saturating operators: +|, -|, *|, <<|, +|=, -|=, *|=, <<|=
2021-09-28 21:15:37 -07:00
Sashiri
fed1c4c2c6 usingnamespace semantics update
+ Ast changes adjustments
2021-09-04 21:25:35 +02:00
Lee Cannon
2ffd93280e remove deleted keywords 2021-08-30 13:54:27 +01:00
Alexandros Naskos
bba069526c
Fix build for zig master by inserting null terminators when tokenizing and resetting them when needed 2021-07-10 19:58:37 +03:00
Lee Cannon
ac4b198869 Update to zig master
Redundant comptime, unused locals, unused function params, unused captures

As issue with @"type" resolving to the keyword type
2021-06-24 11:38:01 +01:00
Lee Cannon
c2cbc05135 Fix index of of range 2021-06-18 12:58:15 +01:00
Alexandros Naskos
b756ed4da5
Fixed HashMap usage for latest master stdlib 2021-06-04 14:06:11 +03:00
Alexandros Naskos
759a7b7fd9
No longer show completions for declarations in aggregate types when
field accessing instances of those types.
2021-05-08 19:30:22 +03:00
四光年
d4551030c4 [bug-fix]hover struct field not show docs. 2021-05-07 17:10:13 +08:00
Jonathan Hähne
807bd6a571 Simplify semantic_tokens, fix off-by-one error in identifierFromPosition 2021-05-02 19:59:17 +02:00
Jonathan Hähne
f61c9d8d4f Run zig fmt 2021-04-15 18:17:06 +02:00
Jonathan Hähne
b90c9b49ac Fix inclusion of toplevel doc comments, remove @async recursion in
writeNodeTokens, add a few regression tests
2021-04-15 11:07:43 +02:00
Jonathan Hähne
bb493c037a Add proper range check
Whoops
2021-04-07 17:26:50 +02:00
Jonathan Hähne
0b2d633e1e Support "catch" scopes 2021-04-07 15:42:33 +02:00
Jonathan Hähne
0e4f4c1e04 Improve testing infrastructure
It should now be a bit easier to set up a test and see how it failed.
2021-04-07 15:10:18 +02:00
Jonathan Hähne
b59db79a05 Refactor makeScopeInternal 2021-04-07 09:21:01 +02:00
Jonathan Hähne
45c7f9671c Merge some cases of resolveTypeOfNodeInternal 2021-04-06 18:38:17 +02:00
Alexandros Naskos
6d13591d02
Merge branch 'master' of github.com:zigtools/zls 2021-04-05 19:45:12 +03:00
Alexandros Naskos
4b0d86f0bc
Fixed lastToken when called on function prototypes with no return type 2021-04-05 19:44:45 +03:00
Benjamin Tan
36ea1975bd
Standardize insertText to be above insertTextFormat 2021-04-05 22:27:56 +08:00
Benjamin Tan
33f03d36a5
completion: Add insertText field for enum completions
Another bug with the older version of lsp-mode on Emacs prevents the
label from being inserted when there is an empty `insertText`. This
commit adds an `insertText` property to enum completions for consistency
with the rest of the completion items.
2021-04-05 22:27:56 +08:00
Alexandros Naskos
902c91e98f
Pass the correct handle to hasSelfParam in bound type parameter evaluation code 2021-04-05 14:52:41 +03:00
Tau
b03fb5ffe3
Fix stack overflow and clean up a bit of resolveTypeOfNode (#297) 2021-04-05 14:46:05 +03:00
Tau
fc51dac30e
Fix stack overflow in resolveUse and int overflow in lookupSymbolGlobal 2021-04-05 01:35:33 +03:00
Alexandros Naskos
4bee4e662b
Made lookupGlobalSymbol start the search from the innermost scope that contains the source index 2021-04-04 15:28:57 +03:00
Alexandros Naskos
04372999aa
Fixed underflow in edgecase in getDocCommentTokenIndex 2021-04-04 02:12:57 +03:00
Tau
406214fb43
Fix stack overflow on missing return value & improve getDocCommentTokenIndex correctness (#290)
* Improve getDocCommentTokenIndex correctness
* Fix stack overflow on missing return value
2021-04-04 02:03:25 +03:00
Alexandros Naskos
cc3c146749
Correctly handle skipping self parameters in signature help requests
as well as completion requests.
2021-04-03 18:54:26 +03:00
Alexandros Naskos
7f432d8715
Implemented the signature help request.
Refreshes builtin data, added 0.7.1 builtins
2021-04-02 20:49:01 +03:00
Alexandros Naskos
9cc8085699
Started signature help implementation 2021-04-01 14:20:37 +03:00
Alexandros Naskos
8cf6029f1a
Before documentPositionContext returns .empty, check if an identifier
immediately follows the cursor and return .var_access if it does
  instead.
This allows hover and go to definition to work when the cursor is
  immediately before an identifier.
2021-03-31 02:25:49 +03:00
Alexandros Naskos
2415e7ca6d
Removed all zig.ast.Tree methods that call lastToken with our own versions 2021-03-30 20:59:58 +03:00
Alexandros Naskos
5a88f26980
Fixed dereference resolution of Type.data.pointer values 2021-03-30 16:45:49 +03:00
Alexandros Naskos
f382a1b22d
Better import handling 2021-03-30 15:41:59 +03:00
Jonathan Hähne
c7158f7625 Remove checks again 2021-03-30 11:23:09 +02:00
Jonathan Hähne
83f153e87e Actually make it build (sem-token support has regressed previously!) 2021-03-30 11:07:29 +02:00
Jonathan Hähne
aab9ca18f2 Fix some crashes & find all @imports
If there are parse errors, an AST can contain uninitialized nodes.
Walking the tree in this case can lead to horribly nasty crashes.
2021-03-30 10:33:21 +02:00
Alexandros Naskos
b417e64e10
Do not show tests in container completions 2021-03-29 15:41:58 +03:00
Alexandros Naskos
e770e2bead
Fixed regression from latest commit 2021-03-29 15:35:14 +03:00
Alexandros Naskos
962327425d
Fixed enum completion generation 2021-03-29 14:57:16 +03:00
Alexandros Naskos
4e753338af
Added error set and enum completion deduplication 2021-03-29 14:02:58 +03:00
Alexandros Naskos
360c437d6a
Some style fixes in analysis.zig 2021-03-29 13:01:24 +03:00
Alexandros Naskos
81500697db
Fixed crash in makeScopeInternal 2021-03-29 12:40:52 +03:00
Alexandros Naskos
2d168ed63e
Fixed error completion generation when making document scopes 2021-03-29 12:28:52 +03:00
Alexandros Naskos
48b5ca5385
Always send an insertText field in completion items 2021-03-28 17:02:48 +03:00