aboutsummaryrefslogtreecommitdiffstats
path: root/lib/syntax_tools/src
AgeCommit message (Collapse)Author
2016-01-20syntax_tools: Correct a typeHans Bolinder
2015-12-11Use 'rand' instead of the obsolete 'random' moduleBjörn Gustavsson
In most cases, we don't have to seed the random number generator, as the rand:uniform/1 takes care about that itself.
2015-10-09Update Syntax ToolsHans Bolinder
Record field types have been modified due to commit 8ce35b2: "Take out automatic insertion of 'undefined' from typed record fields".
2015-09-15syntax_tools: Use the erl_anno module a bit moreHans Bolinder
2015-06-18Change license text to APLv2Bruce Yinhe
2015-05-29syntax_tools app file: Update dependenciesBjörn Gustavsson
The compiler application is now a dependency.
2015-05-28Makefile: Eliminate crash when building with native libsBjörn Gustavsson
When building with --enable-native-libs and allowing 'make' to use multiple threads, the compiler would crash because the erl_syntax module was missing. Here is the recipe for making it crash on my computer: git clean -dxfq MAKEFLAGS='-j10' ./otp_build setup -a --enable-native-libs What would happen is that when merl_transform was used to compile itself, it would call 'merl' which in turn would call erl_syntax and erl_syntax_lib. Since those modules were not listed as dependencies, there was no guarantee that they had actually been compiled. In fact, erl_syntax is a large module so a compilation it with +native would usually not finish before it was needed for compiling merl_transform. To ensure that the erl_syntax and erl_syntax_lib modules are available when needed, they must be explicitly listed as dependencies.
2015-05-25Merge branch 'richcarl/syntax_tools/add-merl'Björn Gustavsson
* richcarl/syntax_tools/add-merl: Make merl compatible with OTP 18.0 Add tests for merl in syntax_tools Include Merl in Syntax Tools
2015-05-25Update runtime_dependencies in application resource filesHans Bolinder
Applications that use the new erl_anno module are depending on STDLIB 2.5. Note that CosNotification, Megaco, SNMP, Xmerl, and Parsetools use the erl_anno module via the Yecc parsers only (the header file in lib/parsetools/include/yeccpre.hrl calls the erl_anno module). HiPE does not call the erl_anno module, but uses an exported type. We have chosen to make HiPE dependent on the erl_anno module.
2015-05-22Make merl compatible with OTP 18.0Richard Carlsson
2015-05-22Include Merl in Syntax ToolsRichard Carlsson
2015-04-30syntax_tools: Use module erl_annoHans Bolinder
2015-02-23Merge branch 'richcarl/syntax_tools-remove-mnemosyne'Zandra Hird
* richcarl/syntax_tools-remove-mnemosyne: Remove Mnemosyne rules support from EDoc Remove support for Mnemosyne rules Remove support for mnemosyne-style record field access OTP-12511
2015-01-15Merge branch 'maint'Bruce Yinhe
2014-12-29fix bad format of error in epp_dodger:parse_file/3Richard Carlsson
2014-12-22Remove support for Mnemosyne rulesRichard Carlsson
2014-12-22Remove support for mnemosyne-style record field accessRichard Carlsson
(The support in erl_parse got removed when 'packages' were removed, since the dot notation was overlaid on the existing mnemosyne access syntax.)
2014-10-27Merge branch 'maint'Björn-Egil Dahlberg
2014-10-24syntax_tools: Teach Maps to erl_syntaxBjörn-Egil Dahlberg
Affected functions: * erl_syntax:abstract/1 * erl_syntax:concrete/1 * erl_syntax:is_leaf/1 * erl_syntax:is_literal/1
2014-10-24syntax_tools: Fix is_literal/1 for binaryBjörn-Egil Dahlberg
2014-07-02Merge branch 'maint'Magnus Lidén
2014-06-26edoc, syntax_tools: Don't fail on invalid UTF-8Hans Bolinder
As a temporary measure to ease the transition to default UTF-8 encoding, automatically fall back to the Latin-1 encoding (without any warnings; the Erlang Compiler will emit a proper warning). The intention is to remove this workaround in OTP 18 or 19.
2014-05-14Merge branch 'maint'Björn-Egil Dahlberg
2014-05-09Fix reverting map in syntax_toolsRoland Karlsson
There was a copy-paste bug in erl_syntax when running e.g. erl_syntax:revert_forms, affecting maps. Instead of getting Key/Value you got Key/Key in the resulting abstract form.
2014-04-28[syntax_tools] Let erl_syntax:concrete() accept the F/A syntaxHans Bolinder
Note: `arity_qualifier` nodes are recognized. This is to follow The Erlang Parser when it comes to wild attributes: both {F, A} and F/A are recognized, which makes it possible to turn wild attributes into recognized attributes without at the same time making it impossible to compile files using the new syntax with the old version of the Erlang Compiler.
2014-04-28Introduce the attribute -optional_callbacks in the context of behavioursHans Bolinder
2014-03-20Introduce runtime_dependencies in .app filesRickard Green
Most dependencies introduced are exactly the dependencies to other applications found by xref. That is, there might be real dependencies missing. There might also be pure debug dependencies listed that probably should be removed. Each application has to be manually inspected in order to ensure that all real dependencies are listed. All dependencies introduced are to application versions used in OTP 17.0. This since the previously used version scheme wasn't designed for this, and in order to minimize the work of introducing the dependencies.
2014-02-25Correct a contract in the igor moduleHans Bolinder
Thanks Kostis.
2014-02-24syntax_tools: Fix broken doc links for MapsBjörn-Egil Dahlberg
2014-02-24Merge branch 'hb/dialyzer/deprecate_types/OTP-10342'Hans Bolinder
* hb/dialyzer/deprecate_types/OTP-10342: Deprecate pre-defined built-in types
2014-02-24Merge branch 'schlagert/fix_basic_appups'Siri Hansen
* schlagert/fix_basic_appups: Dynamically configure typer_SUITE according to environment Disable hipe_SUITE when environment doesn't support it Make hipe non-upgradable by setting appup file empty Fix missing module on hipe app file template Add test suites performing app and appup file checks Introduce appup test utility Fix library application appup files Fix non-library appup files according to issue #240 OTP-11744
2014-02-23Deprecate pre-defined built-in typesHans Bolinder
The types array(), dict(), digraph(), gb_set(), gb_tree(), queue(), set(), and tid() have been deprecated. They will be removed in OTP 18.0. Instead the types array:array(), dict:dict(), digraph:graph(), gb_set:set(), gb_tree:tree(), queue:queue(), sets:set(), and ets:tid() can be used. (Note: it has always been necessary to use ets:tid().) It is allowed in OTP 17.0 to locally re-define the types array(), dict(), and so on. New types array:array/1, dict:dict/2, gb_sets:set/1, gb_trees:tree/2, queue:queue/1, and sets:set/1 have been added.
2014-02-21Merge branch 'nox/maps-erl_syntax-fix-docs'Björn-Egil Dahlberg
* nox/maps-erl_syntax-fix-docs: Mention map trees in erl_syntax:type/1 documentation
2014-02-18Fix library application appup filesTobias Schlager
As discussed in issue #240 *all* OTP library applications use the '.*' wildcard as up and down version. This makes library applications always up- and downgradeable. Using the wildcard version obsoletes all maintenance tasks regarding library applications' appup files. Additionally, it prevents upgrade problems caused by automatically included application dependencies when using reltool to create releases. Missing copyright headers are now consistently present.
2014-02-08Mention map trees in erl_syntax:type/1 documentationAnthony Ramine
2014-02-07Merge branch 'nox/eep37/OTP-11537'Björn Gustavsson
* nox/eep37/OTP-11537: Support named funs in erl_prettypr
2014-02-01Support maps in erl_prettyprAnthony Ramine
2014-02-01Support named funs in erl_prettyprAnthony Ramine
2014-01-31Complete support of maps in erl_syntaxAnthony Ramine
map_expr/1 map_expr/2 map_expr_argument/1 map_expr_fields/1 map_field_assoc/2 map_field_assoc_name/1 map_field_assoc_value/1 map_field_exact/2 map_field_exact_name/1 map_field_exact_value/1
2014-01-29Fix representation of named funs in syntax_toolsAnthony Ramine
A named fun's name is a variable name, its type in syntax_tools is named_fun_expr.
2014-01-28edoc,syntax_tools: Teach Map understandingBjörn-Egil Dahlberg
2014-01-28Merge branch 'feat/erl_tidy_print_to_stdout'Siri Hansen
* feat/erl_tidy_print_to_stdout: Added documenation for the new option describing what it does. Add initial implementation of having erl_tidy print to screen instead of writing to the file provided. The reason for this is that you may want to have an intermediary step between saving the tidied file and using the output. OTP-11632
2014-01-2717.0 anchor and broken links fixesLukas Larsson
2014-01-23Added documenation for the new option describing what it does.Aaron
2014-01-23Add initial implementation of having erl_tidyAaron
print to screen instead of writing to the file provided. The reason for this is that you may want to have an intermediary step between saving the tidied file and using the output. Use-case personally is wanting to integrate erl_tidy into emacs and tidy buffers, overwriting the current file is generally not how this works in emacs with source code tidiers.
2014-01-21Merge branch 'maint'Magnus Lidén
2014-01-21Fix reverting of local implicit funs in erl_syntaxAnthony Ramine
This partially reverts 290dc2b08a2f92157ac5358fba815f4dbb32f8f2 in which implicit funs were mistakenly thought to be using abstract terms for their name and arity.
2013-12-12EEP 37: Funs with namesAnthony Ramine
This adds optional names to fun expressions. A named fun expression is parsed as a tuple `{named_fun,Loc,Name,Clauses}` in erl_parse. If a fun expression has a name, it must be present and be the same in every of its clauses. The function name shadows the environment of the expression shadowing the environment and it is shadowed by the environment of the clauses' arguments. An unused function name triggers a warning unless it is prefixed by _, just as every variable. Variable _ is allowed as a function name. It is not an error to put a named function in a record field default value. When transforming to Core Erlang, the named fun Fun is changed into the following expression: letrec 'Fun'/Arity = fun (Args) -> let <Fun> = 'Fun'/Arity in Case in 'Fun'/Arity where Args is the list of arguments of 'Fun'/Arity and Case the Core Erlang expression corresponding to the clauses of Fun. This transformation allows us to entirely skip any k_var to k_local transformation in the fun's clauses bodies.
2013-11-11Remove a useless function clause in erl_syntax_libAnthony Ramine
2013-11-11Fix transformation of implicit funs in igorAnthony Ramine
Function erl_syntax_lib:analyze_implicit_fun/1 should not be called on implicit external funs, as their parts can contain variables instead of atoms and integers.