Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expand AST using Macro.Env API #293

Merged
merged 239 commits into from
Oct 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
239 commits
Select commit Hold shift + click to select a range
c6bcf8f
squash
lukaszsamson Apr 21, 2024
3c391bc
wip
lukaszsamson Apr 23, 2024
24abad6
behaviours
lukaszsamson Apr 24, 2024
8db10ba
defoverridable
lukaszsamson Apr 25, 2024
48a925f
do not raise on unknown local
lukaszsamson Apr 25, 2024
fd4a4f3
variables
lukaszsamson Apr 26, 2024
2e46073
variables
lukaszsamson Apr 26, 2024
7460210
more tests
lukaszsamson Apr 26, 2024
6e50e3d
module attribute
lukaszsamson Apr 28, 2024
eceb36f
defdelegate
lukaszsamson Apr 28, 2024
42aeb0d
calls
lukaszsamson Apr 29, 2024
6e99c46
fix bug in bind_quoted
lukaszsamson Apr 29, 2024
ae9f28c
some support for unquote fragments
lukaszsamson May 1, 2024
d3c9ad3
typespecs
lukaszsamson May 1, 2024
4fd9305
structs
lukaszsamson May 2, 2024
1cf683e
doc and meta
lukaszsamson May 2, 2024
d0cdf68
Merge branch 'macro-envy' into expand-checkpoint
lukaszsamson May 2, 2024
4b5fb8d
records
lukaszsamson May 3, 2024
05f8a6c
protocols
lukaszsamson May 3, 2024
d9103a4
reduce debug amount
lukaszsamson May 4, 2024
895cdca
attribute type inference
lukaszsamson May 6, 2024
caf4270
first step
lukaszsamson May 7, 2024
199b196
simplify var handling
lukaszsamson May 8, 2024
ec5a4ba
Merge branch 'master' into vars-simplification
lukaszsamson May 8, 2024
61c37f6
fix scopes
lukaszsamson May 8, 2024
d02daf5
expand local structs
lukaszsamson May 9, 2024
f6f1806
recover from map key errors
lukaszsamson May 9, 2024
2e4bc72
error tolerant opts
lukaszsamson May 9, 2024
320eef8
recover from incomplete code with naked when
lukaszsamson May 9, 2024
ff4a89c
rescue errors on captures
lukaszsamson May 9, 2024
fb49008
cleanup leftovers
lukaszsamson May 9, 2024
9c4c4a9
macro call tracking
lukaszsamson May 9, 2024
8fa0283
track calls and vars in typespecs
lukaszsamson May 11, 2024
fe120d7
fix capture call registration on 0 arity
lukaszsamson May 12, 2024
2b059d4
register super calls
lukaszsamson May 12, 2024
7fd4370
use the same cursor as Code.Fragment does
lukaszsamson May 12, 2024
167fc2e
return only visible versions of vars
lukaszsamson May 12, 2024
52009d8
improve var selection
lukaszsamson May 12, 2024
f78737a
store cursor env
lukaszsamson May 12, 2024
1086eb4
error recovery on case, cond, try, receive
lukaszsamson May 12, 2024
6da2a71
with error recovery
lukaszsamson May 12, 2024
ffe71c8
test uniq omission
lukaszsamson May 13, 2024
1a27894
error recovery in for
lukaszsamson May 13, 2024
fd291ab
register first cursor
lukaszsamson May 13, 2024
c95584f
error recovery in fn
lukaszsamson May 13, 2024
eef12e8
error recovery in capture
lukaszsamson May 13, 2024
4e148fa
error recovery in pin
lukaszsamson May 13, 2024
c816fb3
map error recovery
lukaszsamson May 13, 2024
e8ad822
error recovery in struct
lukaszsamson May 14, 2024
b9dbe80
bitstring error recovery
lukaszsamson May 14, 2024
8e3a36f
quote unquote error recovery
lukaszsamson May 16, 2024
97f0ab5
remove warnings
lukaszsamson May 16, 2024
d602c6c
handle a few more case/cond/receive/try cases
lukaszsamson May 17, 2024
14da3fa
error recovery in calls
lukaszsamson May 17, 2024
48f4ca1
alias error recovery
lukaszsamson May 17, 2024
e19806f
error recovery in super
lukaszsamson May 18, 2024
cb9c055
fix typo
lukaszsamson May 18, 2024
461e118
fix inverted condition
lukaszsamson May 18, 2024
bd25497
recover one more capture error
lukaszsamson May 18, 2024
a123534
ambiguous calls
lukaszsamson May 18, 2024
5df54f4
resolve todos
lukaszsamson May 19, 2024
071a3e4
cover more cases
lukaszsamson May 19, 2024
252ecb6
do not validate scope
lukaszsamson May 19, 2024
dfb831e
handle a few more cases
lukaszsamson May 19, 2024
1d128be
a few more cases
lukaszsamson May 19, 2024
b591ef5
remove asserts
lukaszsamson May 19, 2024
b5b8f75
update to master changes
lukaszsamson May 22, 2024
49586ef
first step on type inference
lukaszsamson May 23, 2024
903a4c6
improve def expansion
lukaszsamson May 23, 2024
56ad715
type inference in with, case, for
lukaszsamson May 24, 2024
e530e92
infer types from guards
lukaszsamson May 25, 2024
d2b2ce7
apply inline fix from master
lukaszsamson May 25, 2024
ff843ae
apply master fixes
lukaszsamson May 25, 2024
f477291
apply master fixes
lukaszsamson May 25, 2024
e499d25
fix crash on bitstring type inference
lukaszsamson May 25, 2024
54b0daf
type inference in rescue clause
lukaszsamson May 25, 2024
3507091
fix invalid test
lukaszsamson May 25, 2024
fe480f7
Merge branch 'master' into vars-simplification
lukaszsamson May 26, 2024
a9bbdd8
fix test
lukaszsamson May 26, 2024
d4077cb
enable rewrite only in tests
lukaszsamson May 26, 2024
46f6cd3
resolve most issues in guard type inference
lukaszsamson May 28, 2024
bf92da8
nested match
lukaszsamson May 29, 2024
3dcf8a2
simplify type inference
lukaszsamson May 30, 2024
b5f93b5
provide env from cursor
lukaszsamson May 30, 2024
ca7986a
store variable version
lukaszsamson May 30, 2024
2e018b5
improve var scope updates
lukaszsamson May 30, 2024
d88a94d
try to get cursor env by replacing range with cursor
lukaszsamson Jun 1, 2024
401588a
current buffer import
lukaszsamson Jun 2, 2024
588db74
Merge branch 'master' into vars-simplification
lukaszsamson Jun 15, 2024
9f2adb7
apply capture fix from elixir
lukaszsamson Jun 15, 2024
a4c379e
backport Macro.Env APIs
lukaszsamson Jul 17, 2024
f7e5305
removing dead code
lukaszsamson Jul 18, 2024
d1abdc5
removing unused struct fields
lukaszsamson Jul 18, 2024
3470c6f
silence warning on < 1.17
lukaszsamson Jul 18, 2024
b379cc0
do not crash on undefined var read
lukaszsamson Jul 18, 2024
eb6ef4f
fix test
lukaszsamson Jul 18, 2024
0181de2
remove dbg
lukaszsamson Jul 18, 2024
1264e0f
add missing delegates
lukaszsamson Jul 19, 2024
24a0fad
fix test
lukaszsamson Jul 19, 2024
8cdbd94
improve graceful handling of defs with unquote fragments
lukaszsamson Jul 19, 2024
21b3747
resolve TODO
lukaszsamson Jul 19, 2024
f7bc517
handle dynamic struct
lukaszsamson Jul 19, 2024
bbe14de
fix defdelegate doc collection
lukaszsamson Jul 20, 2024
47a5908
remove not needed code
lukaszsamson Jul 20, 2024
e83d22b
remove TODO
lukaszsamson Jul 20, 2024
13e2e02
do not crash on defdelegates with unquote fragments
lukaszsamson Jul 20, 2024
37c6c86
add test coverage to type inference
lukaszsamson Jul 29, 2024
58245f2
consistent cursor handling
lukaszsamson Jul 29, 2024
210f46b
underscore unused
lukaszsamson Jul 29, 2024
c58c3ca
propagate none type from match context
lukaszsamson Jul 29, 2024
e3f96f9
error tolerance
lukaszsamson Jul 29, 2024
d721b62
fix tests
lukaszsamson Jul 29, 2024
f4d02c9
simplify match operator type inference
lukaszsamson Jul 31, 2024
8c8f891
rename
lukaszsamson Jul 31, 2024
54fd777
rename
lukaszsamson Jul 31, 2024
2638bb0
rename
lukaszsamson Jul 31, 2024
8aca570
address todo
lukaszsamson Jul 31, 2024
af06985
rename
lukaszsamson Jul 31, 2024
9340ddd
handle ++ and -- operators in binding
lukaszsamson Jul 31, 2024
caab9dc
avoid endless loop on self referencing types
lukaszsamson Jul 31, 2024
456fdb0
expand any, term, dynamic
lukaszsamson Jul 31, 2024
9d587f7
infer types in ++ operator
lukaszsamson Jul 31, 2024
9307a57
add test
lukaszsamson Jul 31, 2024
c5c1b9f
address todo
lukaszsamson Jul 31, 2024
bce0d67
include variable version in type
lukaszsamson Aug 1, 2024
dc1468b
find any version variable
lukaszsamson Aug 1, 2024
d7ed649
add versions in more places
lukaszsamson Aug 2, 2024
2a48c26
address todo
lukaszsamson Aug 4, 2024
17d419a
handle rewritten versions in binding
lukaszsamson Aug 4, 2024
4f3b28f
intercept ex_unit DSL
lukaszsamson Aug 5, 2024
99cd8c5
log failed expansions
lukaszsamson Aug 6, 2024
238c6ee
add calls tracking on mocros
lukaszsamson Aug 6, 2024
51dbf7c
unify code storing env
lukaszsamson Aug 6, 2024
04c890e
track macro calls
lukaszsamson Aug 8, 2024
83a2d2e
address a few TODOs
lukaszsamson Aug 8, 2024
617eb83
make line and column extraction more robust
lukaszsamson Aug 10, 2024
3d4664a
wip env
lukaszsamson Aug 10, 2024
258a9de
addressed TODO
lukaszsamson Aug 11, 2024
485c2b6
address todo, add context_modules to env
lukaszsamson Aug 11, 2024
77fc422
addressed TODO - added test of runtime module
lukaszsamson Aug 11, 2024
dcd2bda
expose macro aliases, add test
lukaszsamson Aug 11, 2024
0b805ad
expand struct and record fields
lukaszsamson Aug 13, 2024
ac81dcb
expand before_compile
lukaszsamson Aug 13, 2024
1be7aee
address todos
lukaszsamson Aug 14, 2024
abd85f1
test macro expansion
lukaszsamson Aug 15, 2024
e3c74b1
replace Macro calls with non tracing ones
lukaszsamson Aug 15, 2024
c2c0457
improvements and test coverage for guard type inference
lukaszsamson Aug 18, 2024
dd566b7
do not find vars in guards
lukaszsamson Aug 18, 2024
dd65b0c
do not pass match context to not expanded macro calls
lukaszsamson Aug 18, 2024
c48dd7a
preserve cursor typespec
lukaszsamson Aug 18, 2024
a6c8c28
more improvements to cursor expansion
lukaszsamson Aug 18, 2024
9e2ad86
filter internal protocol defs
lukaszsamson Aug 18, 2024
76fc789
fix invalid match
lukaszsamson Aug 19, 2024
5e6f2a5
handle incomplete typespecs
lukaszsamson Aug 20, 2024
054fa8e
fix snippet generation
lukaszsamson Aug 20, 2024
050b0de
add prefix_suffx extraction
lukaszsamson Aug 20, 2024
e9e2c65
do not attempt to fix line not found if we already have cursor env
lukaszsamson Aug 20, 2024
a2933dc
metadata improvements
lukaszsamson Aug 20, 2024
88e3e43
fix some parser test
lukaszsamson Aug 20, 2024
aa2bea7
fix crash on < 1.15
lukaszsamson Aug 20, 2024
0477bf8
fix some tests on < 1.15
lukaszsamson Aug 20, 2024
d7cc89d
another attempt
lukaszsamson Aug 20, 2024
b5d01ce
store env on every node with meta
lukaszsamson Aug 22, 2024
2ebafdd
fix tests on 1.16
lukaszsamson Aug 22, 2024
92914f5
call earlier versions on 1.13
lukaszsamson Aug 22, 2024
b2064c6
1.12 compatible call
lukaszsamson Aug 22, 2024
4b45a76
Revert "1.12 compatible call"
lukaszsamson Aug 22, 2024
2d86e65
drop support for 1.12
lukaszsamson Aug 22, 2024
f86d3ca
add 1.17 and OTP27 to matrix
lukaszsamson Aug 23, 2024
58920b8
remove 1.12 code
lukaszsamson Aug 23, 2024
d334036
more robust typespec handling
lukaszsamson Aug 25, 2024
e384c09
record closest env
lukaszsamson Aug 25, 2024
3477371
improvements to typespec expansion
lukaszsamson Aug 26, 2024
8283311
add tests
lukaszsamson Aug 26, 2024
0e5f29e
do not expand builtin types
lukaszsamson Aug 26, 2024
675dfad
wrap defs in try if there are other blocks than do
lukaszsamson Aug 28, 2024
17c1bfc
simplify clauses expansion
lukaszsamson Aug 28, 2024
f7cd3d1
module vars are not accessible in module callbacks
lukaszsamson Aug 29, 2024
c697155
simplify function var scope handling
lukaszsamson Aug 29, 2024
fd08d46
simplify var scopes
lukaszsamson Aug 29, 2024
441de76
refactor
lukaszsamson Aug 29, 2024
cc5e8a0
refactor
lukaszsamson Aug 29, 2024
3731b6a
correctly handle var versioning
lukaszsamson Aug 29, 2024
51f3c44
format
lukaszsamson Aug 29, 2024
b4e3f71
correctly handle default args
lukaszsamson Aug 30, 2024
c682ddb
handle unexpected default operator
lukaszsamson Aug 30, 2024
2e98217
handle invalid number of args in for do block and catch
lukaszsamson Aug 30, 2024
3fb8ba5
remove ast and macro expander
lukaszsamson Sep 1, 2024
65737d7
remove leftovers
lukaszsamson Sep 1, 2024
8b1772e
fix var rebinding in defs
lukaszsamson Sep 11, 2024
7889851
add function needed by debug adapter
lukaszsamson Sep 11, 2024
29aa177
move write var handling to state module
lukaszsamson Sep 12, 2024
968f4d5
apply fix from elixir
lukaszsamson Sep 12, 2024
45e6356
find cursor in multi alias
lukaszsamson Sep 12, 2024
5028b6a
handle cursor in def name
lukaszsamson Sep 12, 2024
c868a18
handle cursor in more cases
lukaszsamson Sep 13, 2024
b802c3d
add find_var
lukaszsamson Sep 18, 2024
332ed4a
don't rise on invalid attributes
lukaszsamson Sep 19, 2024
b117cae
better type inference in map guards
lukaszsamson Sep 19, 2024
8d76dc2
a few tests fixed
lukaszsamson Sep 20, 2024
58becdf
fix parser tests
lukaszsamson Sep 21, 2024
903f856
resolve todo
lukaszsamson Sep 23, 2024
6d8c528
resolve todos
lukaszsamson Sep 23, 2024
b4bab8d
resolve todos
lukaszsamson Sep 23, 2024
521bd24
better support for variable tracking in unquote fragments
lukaszsamson Sep 23, 2024
c5c0437
handle unquote_slicing in args and correctly expand defaults in defde…
lukaszsamson Sep 26, 2024
6aca656
do not infer special forms as local calls
lukaszsamson Sep 26, 2024
35b80ca
address todos
lukaszsamson Sep 27, 2024
1bd3715
address todos
lukaszsamson Sep 27, 2024
ae2654b
fix tests on < 1.16
lukaszsamson Sep 27, 2024
a235a24
exclude more tests on < 1.16
lukaszsamson Sep 27, 2024
c3cd2dc
fix regression and invalid version check
lukaszsamson Sep 27, 2024
65f1798
exclude some tests on < 1.15
lukaszsamson Sep 27, 2024
fa78f3a
fix crash on < 1.14
lukaszsamson Sep 27, 2024
20003df
exclude more tests
lukaszsamson Sep 27, 2024
f0bad12
exclude and fix tests on < 1.15
lukaszsamson Sep 28, 2024
534cb0f
finer excludes
lukaszsamson Sep 28, 2024
26d4e87
exclude tests on < 1.14
lukaszsamson Sep 28, 2024
67b22e2
simplify current_env
lukaszsamson Sep 30, 2024
986781b
format
lukaszsamson Sep 30, 2024
d640145
Revert "simplify current_env"
lukaszsamson Sep 30, 2024
46546b2
optimize boolean
lukaszsamson Oct 1, 2024
f91f258
prevent type narrowing from leaking to outer scope
lukaszsamson Oct 1, 2024
057a578
fix warnings
lukaszsamson Oct 1, 2024
749adcd
disable test
lukaszsamson Oct 1, 2024
44a4987
reverse conditions
lukaszsamson Oct 1, 2024
1ea8683
capture TODOs addressed
lukaszsamson Oct 2, 2024
4eda1d5
work on TODOs
lukaszsamson Oct 4, 2024
a479232
fix tests
lukaszsamson Oct 5, 2024
7322fb4
split modules
lukaszsamson Oct 5, 2024
d0d33d5
fix small issues
lukaszsamson Oct 5, 2024
c085d6e
split out infos from state
lukaszsamson Oct 5, 2024
1a04eaa
separate compiler state
lukaszsamson Oct 5, 2024
4348d7f
fix warnings
lukaszsamson Oct 5, 2024
4626ff9
rename
lukaszsamson Oct 5, 2024
4ef2bc0
fix invalid API usage
lukaszsamson Oct 5, 2024
5f2a694
exclude test
lukaszsamson Oct 5, 2024
ef46958
exclude tests
lukaszsamson Oct 5, 2024
f2b6172
hack for < 1.15
lukaszsamson Oct 5, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 20 additions & 20 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,6 @@ jobs:
fail-fast: false
matrix:
include:
- elixir: 1.12.x
otp: 22.x
tests_may_fail: false
- elixir: 1.12.x
otp: 23.x
tests_may_fail: false
- elixir: 1.12.x
otp: 24.x
tests_may_fail: false
- elixir: 1.13.x
otp: 22.x
tests_may_fail: false
Expand Down Expand Up @@ -65,6 +56,15 @@ jobs:
- elixir: 1.16.x
otp: 26.x
tests_may_fail: false
- elixir: 1.17.x
otp: 25.x
tests_may_fail: false
- elixir: 1.17.x
otp: 26.x
tests_may_fail: false
- elixir: 1.17.x
otp: 27.x
tests_may_fail: false
env:
MIX_ENV: test
steps:
Expand All @@ -87,15 +87,6 @@ jobs:
fail-fast: false
matrix:
include:
- elixir: 1.12.x
otp: 22.x
tests_may_fail: false
- elixir: 1.12.x
otp: 23.x
tests_may_fail: false
- elixir: 1.12.x
otp: 24.x
tests_may_fail: false
- elixir: 1.13.x
otp: 22.x
tests_may_fail: false
Expand Down Expand Up @@ -138,6 +129,15 @@ jobs:
- elixir: 1.16.x
otp: 26.x
tests_may_fail: false
- elixir: 1.17.x
otp: 25.x
tests_may_fail: false
- elixir: 1.17.x
otp: 26.x
tests_may_fail: false
- elixir: 1.17.x
otp: 27.x
tests_may_fail: false
env:
MIX_ENV: test
steps:
Expand Down Expand Up @@ -165,8 +165,8 @@ jobs:
strategy:
matrix:
include:
- elixir: 1.16.x
otp: 26.x
- elixir: 1.17.x
otp: 27.x
steps:
- uses: actions/checkout@v4
- uses: erlef/setup-beam@v1
Expand Down
198 changes: 0 additions & 198 deletions lib/elixir_sense/core/ast.ex

This file was deleted.

Loading
Loading