José Valim
c50a8308cf
Update EEx tokenizer tests
2019-04-24 08:21:40 +02:00
José Valim
cf5d080656
Consistently trim on multiple lines, closes #8792
2019-04-24 07:59:32 +02:00
Eksperimental
84f9128825
Replace use of "item(s)" with "element(s)" in Enum module ( #8885 )
2019-03-12 23:24:22 +01:00
Joe Yates
346f7240fe
Explicity test EEx options in error messages ( #8692 )
2019-01-24 22:19:34 +01:00
Joe Yates
051d3b40eb
Ensure we're testing the actual assignment metadata ( #8691 )
...
The existing test was not actually testing anything, as
the default argument to Keyword.get/3, 0, matched one of the
expected values.
2019-01-24 21:05:02 +01:00
José Valim
52ff4ce544
Group tests and run the formatter
2019-01-04 14:45:52 +01:00
José Valim
92b41acc88
Properly handle closing brackets in do in EEx
2019-01-04 14:35:36 +01:00
Benjamin Milde
3d5d42afd4
Improve eex tokenizer further ( #8594 )
2019-01-04 14:30:23 +01:00
Benjamin Milde
74ca2ac5dc
Allow more complex mixed expressions in EEx ( #8591 )
...
Closes #8590 .
2019-01-04 09:07:02 +01:00
Fernando Tapia Rico
d58340d7ab
Omit parens on calls with only do/end blocks (Macro.to_string) ( #8396 )
2018-11-16 20:51:14 +01:00
Andrea Leopardi
6023568bcf
Deprecate using non-empty lists with the Collectable protocol ( #7785 )
...
Closes #7421 .
2018-07-12 12:13:32 +02:00
José Valim
75541cf472
Condititionally compile and lazily compute __STACKTRACE__ ( #7648 )
...
Erlang/OTP 20 warns if the stacktrace is read outside of a
catch/rescue. This commit mirrors this behaviour by consistently
warning on `System.stacktrace/0` being used outside of a
catch/rescue.
Erlang/OTP 21 warns whenever System.stacktrace/:erlang.get_stacktrace
are used. Therefore we need to promote the usage of `__STACKTRACE__`
and make sure to conditionally compile it according to the OTP version.
This requires changes to the Exception normalization mechanism
so we compute `__STACKTRACE__` only when strictly required.
In future Elixir releases, `System.stacktrace/0` will warn when
used even inside catch/rescue.
2018-05-07 15:33:36 +02:00
José Valim
794928efe1
Restrict next break fits and eols on operators and function calls
...
* Whitelist which operators support next_break_fits
* No longer consider tuples as part of next_break_fits
* Do not consider eol for = and ::
* Do not consider eol for calls with one next_break_fits arg
2017-10-27 12:34:09 +02:00
José Valim
874fa06d1f
Fixes to previously formatted files
2017-10-12 09:01:21 +02:00
Nathan Willson
871111f0d9
Run code formatter on tokenizer_text.exs ( #6905 )
2017-10-12 09:00:21 +02:00
José Valim
f388f95398
Format more files with little formatting requirement
2017-10-10 19:19:32 +02:00
José Valim
6a2ae9f926
Improve formatting on eex_test
2017-10-10 16:33:01 +02:00
Zachary Gohr
96f1f83b86
Run code formatter on EExTest.Compiled ( #6781 )
2017-10-10 16:26:48 +02:00
Petr Stepchenko
45cb528158
Run the code formatter on test_helper.exs ( #6671 )
2017-10-09 13:56:40 +02:00
Pedro Medeiros
843bd0d9b7
Raise on middle expression without start expression in EEx ( #6610 )
2017-09-28 10:33:56 +02:00
José Valim
27918ffbc2
Add handle_begin and handle_end to EEx
...
Elixir v1.5.0 attempted to repurpose the value of init
to use throughout the engine but such was a breaking change.
To address this problem, we added handle_begin and
handle_end which were designed exactly to handle inner
buffers.
This comes with the benefit that EEx.Engine can now have
any data structure as state and no longer only quoted
expressions.
Closes #6391 .
2017-07-29 22:05:38 +02:00
Tomek Gryszkiewicz
85bed94ec9
Allow markers "/" and "|" to be used in a custom EEx engine ( #6281 )
2017-07-03 22:02:37 +02:00
Wojtek Mach
a701cc8bc2
Turn EEx.SyntaxError into a warning to keep backwards compatibility ( #6220 )
2017-06-14 17:51:41 +02:00
Mengxuan Xia
a8fbcb2e28
More work regarding making CI on Windows green ( #6150 )
2017-05-26 00:50:58 +02:00
José Valim
2daf5829d9
Do not raise on invalid eex expression as it was accidentally supported
2017-03-07 12:38:59 +01:00
José Valim
edd38eee48
Support middle expressions on trim mode, closes #5752
2017-02-09 20:40:42 +01:00
José Valim
ed93a02ae3
Improve error message on invalid middle/end in EEx
...
Closes #5691
2017-01-22 22:59:06 +01:00
José Valim
e1c6b1c480
Tidy up EEx test suite
2017-01-22 22:31:03 +01:00
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
1015ff8d3b
Fix warning errors in IEx and EEx
2016-05-15 21:00:20 +02: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
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
Brandon Fish
01cc83b0e1
Add test coverage to EEx
2016-04-03 08:43:22 -05: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
4b5e988b42
Inspect path in File.Error exception message
2016-01-24 23:18:00 +01:00
José Valim
036e4e34a4
Include init/1 in EEx engines
2016-01-21 22:33:58 +01:00
José Valim
4fa892208e
Properly change __ENV__.file when @file is set
...
Note that @file may be set from the :file meta as well.
2015-11-21 05:02:38 +08:00
José Valim
949fc7a885
Move eex error to warning
2015-10-23 13:28:42 +02:00
Tony Han
bddb8ae9f7
eex engine raises on missing assigns
2015-06-11 10:30:36 +08:00
José Valim
b83cd9b514
Ensure blocks do not clobber eex buffer
2015-05-11 23:07:26 +02:00
Or Neeman
9e9fe04dae
EEx: allow ) after end in end tokens
...
Closes #3017
2015-04-10 20:49:06 -06:00
Or Neeman
0a1859b6a3
Refactor trim mode
2015-03-25 19:31:01 -06:00
Or Neeman
d90f6ed858
EEx: Add trim option
...
If the `trim` option is used, trims around EEx tags:
- On left, up to the line break if all whitespace
- On right, up to and including the line break if all whitespace
Does not trim around quotations (`<%% %>`), but does trim around
any tags inside a quotation.
Closes #3154
2015-03-23 19:26:18 -06:00
Or Neeman
18998d974f
EEx: convert tag type markers to char lists
2015-03-22 13:36:54 -06:00
Or Neeman
135d02e6cc
EEx: fix interpolation inside quotations
...
Closes #3159
2015-03-22 09:00:34 -06:00
José Valim
ef0009daaa
Unify error reporting from EEx, closes #2833
2014-10-21 11:25:20 -02:00
Shayan Pooya
0ca9d1663d
fix typos
2014-10-16 12:50:12 -05:00
José Valim
058b157b36
Remove deprecated features and deprecate soft ones
2014-07-12 16:23:17 +02:00