José Valim
5247961185
Optimize temp_vars lookup
2013-06-21 11:43:41 +02:00
José Valim
9e56691274
Ensure aliases from macros are properly expanded, closes #1123
2013-05-27 11:08:23 +02:00
José Valim
fbb06f2086
Record each definition on tracker as soon as defined
2013-05-26 14:39:02 +02:00
José Valim
ffc91e3004
Rename Kernel.LocalsTracker to Module.DispatchTracker
2013-05-26 14:39:02 +02:00
José Valim
d757f31ccd
Unused functions with cyclic dependencies are now also warned as unused
...
Closes #1105
2013-05-25 00:14:37 +02:00
José Valim
2c98c0999d
An Elixir module now translates to Elixir.Module instead of Elixir-Module
2013-05-23 14:36:56 +02:00
José Valim
d9b98a62c8
Check if the module is in the same context before checking if it is open
2013-05-19 19:42:13 +02:00
José Valim
23cbf3e853
Support options from macros and @attributes in import, alias and require
2013-05-13 21:51:07 -06:00
José Valim
f38cf28cbd
Store in the AST if contents come from a quoted expression
...
This provides a more robust way of checking from where
the original expressions are coming from compared to the
lexical check_clauses field we had in elixir_scope.
A direct consequence of this commit is that, the following
code:
defrecord Sample, [:hello] do
import List
end
Now raises a warning if the List import is not used,
where it didn't previously.
2013-05-13 15:56:15 -06:00
José Valim
2e96d1de4d
Ensure imports are passed around arg by arg, closes #990
2013-04-28 18:09:23 -07:00
José Valim
c125636535
Ensure the macro system respects imports hygiene, closes #875
2013-04-13 18:25:43 -07:00
José Valim
3f7b867740
Refactor elixir_dispatch to rely more on elixir_scope
2013-04-13 17:19:19 -07:00
José Valim
f7cad1cffc
Improve error messages
2013-03-27 09:54:00 -06:00
José Valim
28211b2714
Ensure aliases expansion also works for implicit aliases
2013-02-03 21:57:39 -07:00
José Valim
f4aed8e873
Reduce vars footprint in case/receive clauses
2013-02-02 13:20:59 -07:00
José Valim
b3747a28e1
Raise an exception if var!(x) does not expand to a proper var
2013-01-21 19:59:37 -07:00
José Valim
89cbe93bba
The AST now allows metadata to be attached to each node
...
This means the second item in the AST is no longer an integer
(representing the line), but a keywords list. Code that relies
on the line information from AST or that manually generate AST
nodes need to be properly updated.
2013-01-21 15:42:03 -07:00
José Valim
4e651c8aae
Expand aliases inside quote
2013-01-11 09:55:38 +01:00
José Valim
eaa9714b3a
Improve hygiene for variables, related to #722
2013-01-10 14:29:45 +01:00
José Valim
82cf622e9b
Enable record rewriter inference
2012-12-03 00:47:34 +01:00
José Valim
b32f6ef51f
Keep variables in a single dictionary
...
This ensures we give the same treatment to quoted
and non-quoted variables.
2012-12-02 12:22:10 +01:00
José Valim
32764b3370
Copy all __ENV__ information on eval
2012-11-15 10:01:18 +01:00
José Valim
52a5f5c9c9
Generate a proper clause var name
2012-11-06 10:19:23 +01:00
José Valim
1ae30a56e2
Do not name quoted variables
2012-11-06 09:54:17 +01:00
José Valim
01f9518899
Keep user's given name when rebinding variables
...
The following code:
counter = 1
counter = 2
Is now rewritten internally to:
counter = 1
counter@1 = 2
Which gives us a couple things:
1. Better debugging
2. We can now show warnings for rebound variables not used
Elixir also keeps `_@` prefix to store internal variables
(for example, `_@1`, `_@MODULE`, etc).
Closes #607 .
2012-11-01 12:37:08 +01:00
José Valim
2f3289aaef
Try a different and simpler approach to clauses warnings, closes #567
2012-10-24 16:57:23 +02:00
José Valim
dc169dc783
Fix an issue where variables inside clauses remained unassigned
2012-10-23 11:48:34 +02:00
José Valim
a617628848
Atoms true and false are also boolean returns
2012-10-23 11:48:34 +02:00
José Valim
bc4918ee0d
Ensure quoted variables are properly carried in clauses
2012-08-17 11:11:04 -03:00
José Valim
bd09818898
Ensure hygiene works with temp vars
2012-08-17 10:48:48 -03:00
José Valim
6abdea44db
Use orddicts to store vars, since we rarely have more than 20 vars
2012-08-17 09:32:18 -03:00
José Valim
1b4603160c
Add elixir's parse transform to be used with erlang code
2012-07-12 11:29:46 +02:00
José Valim
d5031b6347
Move all code to erlang style apps
2012-07-05 20:20:16 +02:00