aboutsummaryrefslogtreecommitdiffstats
path: root/lib/compiler/src/core_pp.erl
AgeCommit message (Collapse)Author
2016-05-13core_pp: Remove uncovered clause in is_simple_term/1Björn Gustavsson
The clause for handling #c_values{} in is_simple_term/1 is never executed. It can be safely removed, since there is a default clause that will return 'false' in the extremly unlikely event that a Without the clause, code such as: let <_v1,_v2> = <1,2> in {_v1,_v2} would be printed with an extra newline: let <_v1,_v2> = <1,2> in {_v1,_v2}
2016-05-13core_pp: Crash on unhandled Core Erlang formsBjörn Gustavsson
Don't try to be nice. Since we now have good test suites for Core Erlang, just let it crash.
2016-05-13core_pp: Remove unused clauses in unindent/3 to improve coverageBjörn Gustavsson
2016-05-13core_pp: Remove useless try...catchBjörn Gustavsson
We will get more information if we don't catch the exception.
2016-05-13core_pp: Simplify printing of map literalsBjörn Gustavsson
Map patterns are never represented as literals. Therefore, a map literal should always be printed with the 'assoc' operator. That also means that there is no remaining use of the 'class' field and that it can be removed from the 'ctxt' record.
2016-04-28Slightly optimize core_ppBjörn Gustavsson
2016-04-21core_pp: Print {file,File} annotations more compactlyBjörn Gustavsson
This will speed up test cases that print all annotations.
2016-04-21core_pp: Add format_all/1 that prints all annotationsBjörn Gustavsson
2016-03-15update copyright-yearHenrik Nord
2015-06-18Change license text to APLv2Bruce Yinhe
2015-02-12Eliminate all uses of core_lib:get_anno/1 and core_lib:set_anno/2Björn Gustavsson
We are about to deprecate core_lib:get_anno/1 and core_lib:set_anno/2, so we should stop using them in the compiler.
2015-01-30Make the syntax for map pairs readableBjörn Gustavsson
Use the same syntax for map pairs in Core Erlang code as in the Erlang Code. This Erlang code: M#{x:=42,y=>1} will look like this in Core Erlang: ~{'x':=42,'y'=>1|M}~
2015-01-28core_pp: Correct printing of map literalsBjörn Gustavsson
A map key in a pattern would be incorrectly pretty-printed. As an example, the pattern in: x() -> #{ #{ a => 3 } := 42 } = X. would be pretty-printed as: <~{~<~{~<'a',3>}~,42>}~ instead of: <~{~<~{::<'a',3>}~,42>}~ When this problem has been corrected, the workaround for it in cerl:ann_c_map/3 can be removed. The workaround was not harmless, as it would cause the following map update to incorrectly succeed: (#{})#{a:=1}
2014-06-24compiler: Fix v3_core Maps pretty printingBjörn-Egil Dahlberg
Key and value were interchanged.
2014-04-03compiler: Fix compiling map keys in patterns from coreBjörn-Egil Dahlberg
2014-03-17compiler: Change #c_map{var} to #c_map{arg}Björn-Egil Dahlberg
Not only variables are allowed as arguments, the name should reflect that. Change cerl Map argument interface * cerl:map_arg/1 is more suitable then cerl:map_val/1 in this case.
2014-03-17compiler: Change Maps Core FormatBjörn-Egil Dahlberg
Ex. Instead of: M~{~<K,V>}~ The format is now: ~{~<K,V>|M}~ This also removes a shift/reduce warning. The changes in core_pp now requires compiler-5.0 to compile because of is_map/1 guard, i.e. a need for a compiler with Maps know-how.
2014-01-29compiler: Squash #c_map_pair_*{} to #c_map_pair{}Björn-Egil Dahlberg
Simplify compiler internals and parsing of core format.
2014-01-28Extend representation for maps in Core ErlangBjörn-Egil Dahlberg
2014-01-28Introduce a representation for maps in Core ErlangBjörn Gustavsson
2009-11-20The R13B03 release.OTP_R13B03Erlang/OTP