José Valim
db47bd56b4
Add Path.relative_to_cwd and rely on it when generating stacktraces
2013-08-14 12:36:54 +02:00
José Valim
34b6e17a1b
Fix shadowing warning in case with function, closes #1524
2013-08-02 13:04:03 +02:00
José Valim
fc505f8a82
Replace ?is_new_atom macro by ?is_atom_start
2013-07-07 21:14:36 +02:00
José Valim
15c1a9891c
Implement bindings in Elixir
2013-07-04 10:18:46 +02:00
José Valim
03323b9bfa
Macro.escape should also escape nested tuples, closes #1344
2013-06-30 15:30:44 +02:00
José Valim
391fee3ea2
^x variables should always refer to the value before the expression
...
Closes #1307
2013-06-21 18:27:16 +02:00
José Valim
5247961185
Optimize temp_vars lookup
2013-06-21 11:43:41 +02:00
José Valim
bff8a6ae75
Remove deprecated code branches
2013-06-13 16:48:31 +02:00
José Valim
fbb06f2086
Record each definition on tracker as soon as defined
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
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
e18c1602ba
Only add quoted: true to required ast nodes
2013-05-13 15:56:15 -06:00
José Valim
02d0aa1d9a
Deprecate var_context in favor of context
2013-05-13 15:56:15 -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
b90b8d1385
Improve cons cell and other operators precedence, closes #862
2013-05-12 14:24:35 -06:00
José Valim
c14ee51d15
Refactor elixir_quote to work on Elixir expressions
...
This allows us to re-use the code from Macro.escape,
reducing the duplication, and gives us more visibility
into the transformation process.
2013-05-04 14:31:58 -06:00
José Valim
c125636535
Ensure the macro system respects imports hygiene, closes #875
2013-04-13 18:25:43 -07:00
José Valim
b96c3c52ae
Remove check_require in favor of a meta tag
2013-04-13 17:19:19 -07:00
José Valim
f2e78d3d39
function(:is_atom, 1) is deprecated in favor of function(is_atom/1)
...
This is required so we can identity the proper function/arity
from quoting and properly hygienize function retrievals.
2013-04-13 17:19:19 -07:00
José Valim
6e8bcd9245
Update CHANGELOG
2013-03-10 18:12:50 -06:00
José Valim
28211b2714
Ensure aliases expansion also works for implicit aliases
2013-02-03 21:57:39 -07:00
José Valim
cd51c80362
Tidy up and clean up quote API, closes #814
2013-02-03 12:14:18 -07:00
José Valim
abb1ae981a
Add hygienic imports to macros
2013-01-21 20:45:49 -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
Kim Shrier
54d74efa04
Update octal and hex escapes for characters, char lists, and strings to all accept
...
the same syntax and be case insensitive. Also relocated the character type macros
into lib/elixir/include/elixir.hrl so that they didn't need to be defined in both
lib/elixir/src/elixir_interpolation.erl and lib/elixir/src/elixir_tokenizer.erl.
Added to the erlang and elixir unit tests to test the new syntax.
2012-12-23 20:05:23 -07: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
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
6abdea44db
Use orddicts to store vars, since we rarely have more than 20 vars
2012-08-17 09:32:18 -03:00
José Valim
d5031b6347
Move all code to erlang style apps
2012-07-05 20:20:16 +02:00