Commit Graph

85 Commits

Author SHA1 Message Date
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
Lee Cannon
62d287e518 Handle tag moved backwards without logging 2021-06-26 20:56:22 +01: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
Frank Denis
df9560db51 Update for -master
fn_proto.extern_export_token -> fn_proto.extern_export_inline_token

And update the data by the way.
2021-05-23 18:01:03 +02:00
Alexandros Naskos
5631b8d202
Fix semantic token generation for container fields with a byte alignment 2021-05-08 19:11:26 +03:00
Alexandros Naskos
91643c04c9
Fixed integer overflow in semantic_tokens.Builder.handleComments 2021-05-03 15:36:29 +03:00
Alexandros Naskos
ab8c65eeda
Fixed highlighting of comments before the first token and after the last token of the last valid AST node 2021-05-03 15:14:11 +03:00
Jonathan Hähne
e1c8e5d407 Undo stupidity & run zig fmt 2021-05-02 20:23:26 +02:00
Jonathan Hähne
807bd6a571 Simplify semantic_tokens, fix off-by-one error in identifierFromPosition 2021-05-02 19:59:17 +02:00
Alexandros Naskos
23454e111c
Make semantic_tokens use @asyncCall instead of a stack again. 2021-04-19 17:17:46 +03: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
b59db79a05 Refactor makeScopeInternal 2021-04-07 09:21:01 +02: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
f45a934f50
Fixed for latest zig master 2021-04-01 14:19:02 +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
3e300e4d74
Added our own ifFull implementation, fixes some crashes 2021-03-26 21:46:49 +02:00
Alexandros Naskos
9eece0985b
Fixed crash while typing error. 2021-03-26 21:14:47 +02:00
Alexandros Naskos
2fd8ab7626
Fixed error.<Foo> highlighting 2021-03-26 21:11:35 +02:00
Alexandros Naskos
06518778c1
Removed comment preprocessing code from the semantic tokens gap highlighter,
Fixed various comment semantic highlighting issues.
Refactored some minor parts of the analysis code.
2021-03-26 21:04:51 +02:00
Luuk de Gram
472033a845
Improve token location stability 2021-03-13 12:22:19 +01:00
Luuk de Gram
7a2cd418a8
Scope fixes + semantic token colors:
- Creates a scope for errdefer and adds the payload as a declaration
  (Previously lhs was a token index meaning we had an out of bounds error due too high of an integer)
- Semantic highlighting corrected for error payloads in loops/ifs and errdefers
2021-03-11 20:45:05 +01:00
Luuk de Gram
85937d48ca
Semantic token + scope fixes:
- Highlights pipes of loops/elses payloads correctly
- New ast structure counts last token as the variable itself and not the '}' so change scope checking to '<=' instead of '<'
2021-03-10 10:02:07 +01:00
Luuk de Gram
fd6b94bcc9
Fixes multiple small bugs:
- Correct completion based on scope
 - Semantic tokens for while/if/else/for keywords
 - Fix crash on import path
2021-03-07 21:54:54 +01:00
Luuk de Gram
a078a62a37
Semantic tokens: Allow for multiple line comments 2021-03-07 18:52:22 +01:00
Luuk de Gram
e2f4bbf2f3
Implement semantic tokens for regular comments 2021-03-07 14:51:47 +01:00
Luuk de Gram
3d8a9732fc
Calculate correct token locations and ensure all semantic highlighting matches 2021-03-05 22:38:42 +01:00
Luuk de Gram
acc45b4efe
Use the correct tree to display semantic tokens 2021-03-04 22:53:54 +01:00
Luuk de Gram
9224bbd4dc
Implement all of the semantic tokens 2021-03-04 22:30:25 +01:00
Luuk de Gram
08075a1261
Start fixing semantic tokens 2021-03-04 16:14:30 +01:00
Luuk de Gram
72605c7549
A lot of fixes 2021-02-27 16:38:06 +01:00
Luuk de Gram
0133f0d863
First set of changes to work with new std's ast 2021-02-26 21:26:52 +01:00
Alexandros Naskos
a886ecddd9
Fixed for zig master 2021-02-15 12:04:22 +02:00
Alexandros Naskos
c98c44460c
Fixed session tests 2021-01-28 11:20:13 +02:00
GrayJack
30e3572cee
Rename tagField to enumMember 2021-01-16 03:46:35 -03:00
GrayJack
4f5af38031
Use declaration modifier instead of definition 2021-01-16 03:33:35 -03:00
Alexandros Naskos
87b7954669
Fixed semantic token hihglighting issue when a regular comment was following a doc comment 2021-01-12 14:05:08 +02:00
Alexandros Naskos
d877019abe
Removed struct, enum, opaque, union token types, added them to token modifiers 2020-11-06 11:03:21 +02:00
Alexandros Naskos
f7eff6632e
Cleaned up LSP types, add InitializeResult, no longer use a hardcoded string 2020-11-06 10:08:20 +02:00
Alexandros Naskos
162f1b2fbe Opaque type support 2020-10-10 12:25:50 +03:00
Alexandros Naskos
a2265afce0 Added keywordLiteral token type for null, true, false, undefined, unreachable, fixed all pointer type semantic token generation 2020-10-04 13:10:48 +03:00
Alexandros Naskos
bfb96d951b Fixed prefix op semantic tokens 2020-10-02 15:01:49 +03:00
Alexandros Naskos
751f66068b Some semantic tokens fixes 2020-10-02 14:59:12 +03:00
Tadeo Kondrak
2559f5c6fd
semantic_tokens: Don't @bitCast a flags structure to an integer
No idea why this isn't working, but it was sending the wrong thing.
2020-09-25 15:23:03 -06:00
codehz
d57d04f3bb Adopt to new ast API 2020-09-01 13:53:52 +08:00