Commit Graph
1213 Commits
Author SHA1 Message Date
Aleksei Magusev 96da837136 Emit warning when variable is being expanded to function call (#3517) 2016-06-11 22:31:03 +02:00
eksperimental 3bd976737e Use proper case for proper nouns and acronyms
Use proper case for proper nouns (e.g., Elixir, Rebar, Git, and others)
as well as acronyms (e.g., URL, HTTP, and others).
2016-06-06 15:17:59 +02:00
José Valim abec905009 Use a more explicit pdict key 2016-06-04 16:47:00 +02:00
José Valim 2a1d3d6530 Keep the full list of modules being defined 2016-06-04 11:53:40 +02:00
José Valim 0168713cbf More explicitly use the term annotation throughout 2016-06-03 01:52:15 +02:00
José Valim 405fc896ab Propagate generated: true in Elixir definitions 2016-06-03 01:52:15 +02:00
José Valim 41c21f51cb Update TODOs and CHANGELOG
* Functionality won't be removed before v2.0
  * Features soft-deprecated in Elixir v1.2 will warn on v1.4
  * Features soft-deprecated in Elixir v1.3 will warn on v1.5
2016-06-02 21:21:24 +02:00
José Valim fa920eb6b8 Rename bundle/2 to describe/2 2016-05-30 12:19:21 +02:00
Andrea Leopardi 26a4fc5788 Add support for the @optional_callbacks behaviour attribute (#4705) 2016-05-28 13:19:12 +02:00
José Valim c87a7dbf26 Add @enforce_keys to defstruct, defexception and friends 2016-05-26 13:26:58 +02:00
José Valim dabe5e5102 Add struct expansion via __struct__/1 2016-05-26 12:40:12 +02:00
Eric Entin b15d641e42 Add mix xref --callers M.f/a (#4683) 2016-05-25 21:53:42 +02:00
Eric Entin 0395bac1c1 Warn for remote calls that cannot be resolved at compile time (#4639) 2016-05-22 11:20:45 +02:00
José Valim 793e657eaa Store function definitions and clauses in the same table 2016-05-19 13:23:19 +02:00
José Valim 478ec42778 Use the shortest possible representation when printing floats, closes #3413 2016-05-18 14:38:44 +02:00
José Valim b38ace0a79 Tidy up LexicalTracker 2016-05-18 08:42:33 +02:00
José Valim 4f47f03707 Improve unsafe vars warning 2016-05-16 13:40:46 +02:00
Aleksei Magusev d22e456047 Improve warning output (#4631) 2016-05-16 00:10:51 +02:00
José Valim b79b041fad Improve ambiguous pipe message 2016-05-15 20:46:37 +02:00
José Valim 7cac73a095 Unify warning calls 2016-05-15 20:34:29 +02:00
Adán Sánchez de Pedro Crespo b0261c7b83 Make lexicals (alias, import and require) return the given module(s) instead of nil (#4629)
* Make lexicals return module name instead of nil

* Update tests
2016-05-15 17:53:10 +02:00
Aleksei Magusev 9d03be21b9 Do not emit warning when "with" clause always matches (#4597) 2016-05-09 20:06:33 +02:00
eksperimental 9d4ec8b5f3 Fall-back functions: Kernel.to_char_list/1 and List.Chars.to_char_list/1 protocol 2016-05-09 00:35:44 +07:00
eksperimental 0aece49e2d Replace 'char_list' and 'char list' with 'charlist' 2016-05-07 03:20:57 +07:00
eksperimental 6da34e0225 Standardize unicode and friends (#4569)
* Unicode is a proper noun, so it should be capitalized

* Replace 'char data' with 'chardata'

* Correct use of a/an articles
2016-05-05 09:21:05 +02:00
eksperimental 4ceb41e71b Formmating: Add white space around vertical bar (#4507) 2016-04-25 00:55:49 +02:00
eksperimental bed9816549 Formatting: add white space after comma (#4491)
Standardizes the use of comma leaving a white space after it whenever applicable.

Note: It does not enforce this in quantifiers in regular expressions such as in: `x{1,3}`
2016-04-19 01:23:50 +02:00
José Valim fae0134001 Do not build structs if not necessary 2016-04-13 16:56:15 +02:00
José Valim 89695b2837 Add more test cases to try, improve error message 2016-04-11 12:37:14 +02:00
Daniel Perez b2e8c1451e Allow generated variables in map keys. Fix #4428 (#4504) 2016-04-11 12:27:10 +02:00
José Valim 7ce93f6c8b Normalize and document time and time units 2016-04-05 17:21:33 +02:00
James Fish 8095e867e7 Merge pull request #4455 from whatyouhide/system-os-time
Add System.os_time/0,1 and update time-related docs in System
2016-04-04 23:42:47 +01:00
José Valim 51feaa5e62 Handle chars literals in the parser for better syntax errors
Handle chars literals in the parser for better syntax errors
2016-04-04 21:35:12 +02:00
Andrea Leopardi 8619d26c4d Handle chars literals in the parser for better syntax errors
Before this commit, we handled char literals (like `?a`) in the
tokenizer, turning a literal like `?a` into the token `{:number, _,
97}` (thus indistinguishable from the literal `97` at the parsing
stage). This led to error messages with the integer for the character
instead of the character literal, e.g.:

    iex> :ok ?a
    ** (SyntaxError) iex:11: syntax error before: 97

With this commit, we now turn `?a` into the token `{:char, _,
97}` (which is the same token used by Erlang for Erlang char literals
like `$a`); since it's the same token as in Erlang, the parser will now
output the char literal as an Erlang char (`?a` would be printed as
`$a`). We hijack the error message in elixir_errors.erl to end up with
the correct message:

    iex> :ok ?a
    ** (SyntaxError) iex:11: syntax error before: ?a
2016-04-04 21:29:15 +02:00
José Valim ca856d774e Spell out our deprecation policy 2016-04-03 13:52:15 +02:00
José Valim a913f45442 Update TODOs 2016-04-03 13:00:48 +02:00
Andrea Leopardi 8147fe48e2 Show the full call when calling a function inside a match
Right now, when we call a local function inside a match the error
message only shows the function name and its arity (`foo/1`). With this
commit, we show the full call (`foo(:bar)`) so that it should be easier
to locate the error.
2016-03-31 11:33:32 +02:00
Andrea Leopardi 32a70fabdc Add System.os_time/0,1
These functions are inlined to `:os.system_time/0,1`.
2016-03-30 23:03:39 +02:00
Andrea Leopardi 7b16e64ef8 Add final newlines to a bunch of files
A bunch of files didn't end with a final newline (according to the POSIX
standard -
http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206).
2016-03-29 23:02:22 +02:00
Aleksei Magusev c350283a9b Do not store file information in def with name unquote
Closes #4243.
2016-03-23 23:10:30 +01:00
José Valim 0c13b59654 Merge pull request #4403 from sunny-mittal/refactor
Minor URIConfig refactor
2016-03-18 23:42:01 +01:00
Sunny Mittal 59f7d2b8ea Minor URIConfig refactor 2016-03-18 12:46:45 -07:00
Andrea Leopardi c6e972eb21 Add the keyword/0 and keyword/1 built-in types 2016-03-17 23:57:30 +01:00
José Valim 6a496111b1 Implement functions in Kernel.SpecialForms so we don't special case them in IEx 2016-03-10 09:59:19 +01:00
Aleksei Magusev ec0976ad6a Improve tests for unused import with module 2016-03-06 15:26:42 +01:00
Wojtek Mach 743e8c7ed1 Track {module, function, arity} imports and warn on unused ones
Example:

Say, there's following file:

    # example.exs
    import String, only: [upcase: 1, downcase: 1]
    import Enum

    IO.puts upcase("Hello")

Before this patch:

    # $ elixir example.exs
    # HELLO
    # warning.exs:2: warning: unused import Enum

After this patch:

    # $ elixir example.exs
    # HELLO
    # example.exs:1: warning: unused import String.downcase/1
    # example.exs:2: warning: unused import Enum
2016-02-28 19:53:02 +01:00
José Valim 2559df88a6 Merge pull request #4341 from tuvistavie/fix-sigil-inconsistency
Do not escape new line when interpolation is disabled. Fix #4209.
2016-02-28 17:53:11 +01:00
Daniel Perez 3bd1952de6 Do not escape new line when interpolation is disabled. Fix #4209. 2016-02-29 01:36:16 +09:00
José Valim c7f97ae38e Optimize into: %{} 2016-02-27 09:45:41 +01:00
Renato Moya 75a0177d7a Fix typo in elixir.erl 2016-02-26 18:10:46 -08:00