Commit Graph
338 Commits
Author SHA1 Message Date
Yurii Rashkovskii 9ed5936f9a Fix a bug in macro_exported?/3
Previously, it would fail if a macro with multiple arities was defined but the first occurence of it won't match the requested arity.
2012-11-30 00:56:58 -08:00
Yurii Rashkovskii d731e8ca4a Add macro_exported?/3 helper 2012-11-30 00:41:21 -08:00
José Valim bc53005f98 Add new typespec syntax to defcallback too 2012-11-30 09:35:41 +01:00
José Valim d538bbbd22 Ensure proper stacktrace is shown in macros, closes #676 2012-11-30 09:35:41 +01:00
Yurii Rashkovskii f84800a9d3 AST representation for the :elixir.char_list() type should be char_list() as it is possible to use this type directly without specifying :elixir module name 2012-11-30 00:00:22 -08:00
José Valim 3eb509fdd2 Support -> in Macro.to_binary and improve fn printing too 2012-11-30 08:38:25 +01:00
Yurii Rashkovskii f0ab87fc1e Add a more explicit syntax for ((...) -> ...): (fun(...) -> ...) 2012-11-29 20:44:06 -08:00
Yurii Rashkovskii b1cb6801c7 Change fun(... :: signature) specification format to (... -> signature) 2012-11-29 15:53:37 -08:00
José Valim f249eab01e Ensure parenthesis are allowed in call args 2012-11-29 23:58:25 +01:00
José Valim ced5a4386b Support -> inside parenthesis
This is consistent with the fact that do...end
is a direct translation to do: (...).
2012-11-29 23:47:53 +01:00
José Valim e11285007e More work on improved typespec syntax 2012-11-29 14:13:26 +01:00
Yurii Rashkovskii 0db1f7279b Change function type specification syntax (WIP)
Signed-off-by: José Valim <jose.valim@plataformatec.com.br>
2012-11-29 13:34:06 +01:00
José Valim 401ad781c3 Ensure debug_info is actually set to true 2012-11-28 09:48:04 +01:00
José Valim 4227d94603 Support \xXX and \x{HEX} escape sequences in strings and char lists
It implements the same behaviour as seen in regexes. Closes #661.
2012-11-27 15:50:45 +01:00
José Valim 3de677607c Deprecated assert left in right in favor of assert left inlist right, closes #662 2012-11-27 15:05:03 +01:00
Yurii Rashkovskii e174cbfbfe Add function(Module.fun/arity) and function(fun/arity) syntax
These are equivalent to function(Module, :fun, arity) and function(:fun, arity) constructs, respectively
2012-11-27 01:35:06 -08:00
José Valim 703a7d833f Revert "/u is not required for Elixir regexes"
unicode option is actually required in order to
match \p escape groups.

This reverts commit 0f75b92b25.
2012-11-26 08:36:42 +01:00
José Valim ed0eff4d1d Fix failing erlang tests 2012-11-25 18:25:03 +01:00
José Valim b9600fb6c4 More improvements to typespecs, closes #617 2012-11-25 17:43:56 +01:00
José Valim 5e26cd01b6 Improve error message when invalid token is followed by new line 2012-11-25 17:26:47 +01:00
Yurii Rashkovskii 775803be1a WIP on bounded_fun support
Signed-off-by: José Valim <jose.valim@plataformatec.com.br>
2012-11-25 17:06:30 +01:00
José Valim 9f16178898 Raise an error if clauses with different arities are defined in the same function, closes #657 2012-11-25 17:01:54 +01:00
José Valim 7ddab53707 Also allow multiclause functions on fn
The function macro is still necessary for function
retrieval and it will be extended when R16 is out
to supported named functions
2012-11-25 00:06:39 +01:00
Leo Lou 2984771883 Add String.strip/1 2012-11-24 22:59:51 +08:00
Leo Lou 875d1007a9 Strip whitespace characters instead of space in String.rstrip 2012-11-24 22:44:37 +08:00
Leo Lou 1c8993695d Strip whitespace characters instead of space in String.lstrip 2012-11-24 21:07:18 +08:00
José Valim 600c8022ba Deprecated Enum.qsort and List.sort in favor of Enum.sort 2012-11-23 21:51:11 +01:00
José Valim 5c967ace04 Add Enum.sort which uses merge sort and performs considerably faster than Enum.qsort 2012-11-23 20:10:26 +01:00
José Valim 87ab504e06 Perfomance improvements to Enum.drop/take 2012-11-23 18:51:10 +01:00
José Valim 44bcc00fce Remove tests since utf-8 names on env variables are poorly supported depending on the OS and ERTS 2012-11-20 11:30:53 +01:00
José Valim bd67df4d8c CI doesn't like utf-8 chars as env, let's try iso 2012-11-20 11:16:05 +01:00
José Valim 224f5e47fe Ensure System env functions properly handle utf-8 data 2012-11-20 11:09:53 +01:00
José Valim 0f75b92b25 /u is not required for Elixir regexes 2012-11-20 10:52:57 +01:00
Tim Fletcher bddb614927 Fix percent encoding algorithm used by URI.encode 2012-11-20 00:09:59 +00:00
José Valim 7894ba0fc1 Add IO.binread, IO.binwrite and friends, closes #645 2012-11-16 09:42:35 +01:00
José Valim 40efeb48d7 Reduce atom footprint when compiling code
Previously, we were generating atom names based on
the file or the module name. This commit replaces
it by a pool of atom names. After a module name
is used and purged with success, it is added back
to the pool so it can be reused many times.
2012-11-15 16:44:27 +01:00
José Valim 32764b3370 Copy all __ENV__ information on eval 2012-11-15 10:01:18 +01:00
José Valim 2104b292c1 Ensure rstrip and strip work on emoty strings, closes #643 2012-11-14 10:34:43 +01:00
Carlo Cabanilla b9692fc2fe default record vals to :undefined instead of :nil
When translating erlang records into elixir records, use :undefined
as the default record value since that's what erlang uses, and
presumably you're going to be using these records with erlang apis.
2012-11-12 01:05:17 -05:00
José Valim fcb1a610de Add support for defrecordp 2012-11-10 11:51:13 +01:00
José Valim 02e63e4849 Ensure parenthesis can be used in macros and fn shortcut, closes #634 2012-11-08 15:52:52 +01:00
José Valim e6c75bbe98 Merge pull request #632 from yrashk/is_keyword
Add keyword?/1 function
2012-11-08 03:08:58 -08:00
Yurii Rashkovskii c6a012602c Add Keyword.keyword?/1 function 2012-11-08 03:04:55 -08:00
Yurii Rashkovskii 1b15972d07 Suppress an unnecessary (optimization-related) warning in one of the kernel tests 2012-11-07 06:14:33 -08:00
José Valim 41dbbbf714 Merge pull request #626 from yrashk/typespec-inspect-improvements-record
Add support for printing record typespecs
2012-11-07 04:01:48 -08:00
Yurii Rashkovskii 1331f23a27 Add support for printing record typespecs 2012-11-07 02:40:45 -08:00
José Valim 52a5f5c9c9 Generate a proper clause var name 2012-11-06 10:19:23 +01:00
José Valim 30bfd4736d Remove Calendar from the upcoming release 2012-11-05 15:19:10 +01:00
José Valim e9334fb7dc Tidy up Typespec API, improve docs 2012-11-05 14:51:51 +01:00
José Valim ec68b7dd8a Compile specs and callbacks to @spec and @callback so they are easier to access 2012-11-05 10:26:02 +01:00