aboutsummaryrefslogtreecommitdiffstats
path: root/lib/syntax_tools
diff options
context:
space:
mode:
authorHans Bolinder <[email protected]>2016-06-10 10:32:04 +0200
committerHans Bolinder <[email protected]>2016-06-10 10:32:04 +0200
commit7dd54b5a89d382689562ea19e7ff96daf5b65290 (patch)
treedcdab1be7b8aa4f155951a2ab22c164ff133c9d5 /lib/syntax_tools
parent599b3cd3d802f09a9f921f44e72418e7d7ad1a06 (diff)
parent0d1c055fd82fa71ca4db08d7827de4d20d2f1241 (diff)
downloadotp-7dd54b5a89d382689562ea19e7ff96daf5b65290.tar.gz
otp-7dd54b5a89d382689562ea19e7ff96daf5b65290.tar.bz2
otp-7dd54b5a89d382689562ea19e7ff96daf5b65290.zip
Merge branch 'hasse/dialyzer/improve_from_form/OTP-13547'
* hasse/dialyzer/improve_from_form/OTP-13547: Update primary bootstrap stdlib: Correct types and specs dialyzer: Minor adjustments dialyzer: Suppress unmatched_return for send/2 dialyzer: Improve the translation of forms to types dialyzer: Use a cache when translating forms to types dialyzer: Prepare erl_types:t_from_form() for a cache dialyzer: Optimize erl_types:t_form_form() dialyzer: Correct types syntax_tools: Correct types erts: Correct character repr in doc of the abstract format stdlib: Correct types and specs
Diffstat (limited to 'lib/syntax_tools')
-rw-r--r--lib/syntax_tools/src/Makefile2
-rw-r--r--lib/syntax_tools/src/erl_recomment.erl8
-rw-r--r--lib/syntax_tools/src/erl_syntax.erl9
3 files changed, 13 insertions, 6 deletions
diff --git a/lib/syntax_tools/src/Makefile b/lib/syntax_tools/src/Makefile
index 2e91adf8af..8325db45a8 100644
--- a/lib/syntax_tools/src/Makefile
+++ b/lib/syntax_tools/src/Makefile
@@ -29,7 +29,7 @@ ERL_COMPILE_FLAGS += -pa $(EBIN) -pa ./ -I$(INCLUDE)
ifeq ($(NATIVE_LIBS_ENABLED),yes)
ERL_COMPILE_FLAGS += +native
endif
-ERL_COMPILE_FLAGS += +nowarn_shadow_vars +warn_unused_import -Werror # +warn_missing_spec +warn_untyped_record
+ERL_COMPILE_FLAGS += +nowarn_shadow_vars +warn_unused_import #-Werror # +warn_missing_spec +warn_untyped_record
SOURCES=erl_syntax.erl erl_prettypr.erl erl_syntax_lib.erl \
erl_comment_scan.erl erl_recomment.erl erl_tidy.erl \
diff --git a/lib/syntax_tools/src/erl_recomment.erl b/lib/syntax_tools/src/erl_recomment.erl
index 5ce533285d..c1141b2bc6 100644
--- a/lib/syntax_tools/src/erl_recomment.erl
+++ b/lib/syntax_tools/src/erl_recomment.erl
@@ -601,16 +601,16 @@ expand_comment(C) ->
-record(leaf, {min = 0 :: integer(),
max = 0 :: integer(),
- precomments = [] :: [erl_syntax:syntaxTree()],
- postcomments = [] :: [erl_syntax:syntaxTree()],
+ precomments = [] :: [erl_comment_scan:comment()],
+ postcomments = [] :: [erl_comment_scan:comment()],
value :: erl_syntax:syntaxTree()}).
-record(tree, {min = 0 :: integer(),
max = 0 :: integer(),
type :: atom(),
attrs :: erl_syntax:syntaxTreeAttributes(),
- precomments = [] :: [erl_syntax:syntaxTree()],
- postcomments = [] :: [erl_syntax:syntaxTree()],
+ precomments = [] :: [erl_comment_scan:comment()],
+ postcomments = [] :: [erl_comment_scan:comment()],
subtrees = [] :: [extendedSyntaxTree()]}).
diff --git a/lib/syntax_tools/src/erl_syntax.erl b/lib/syntax_tools/src/erl_syntax.erl
index f4cda814fc..ee42e56172 100644
--- a/lib/syntax_tools/src/erl_syntax.erl
+++ b/lib/syntax_tools/src/erl_syntax.erl
@@ -443,7 +443,14 @@
-type syntaxTree() :: #tree{} | #wrapper{} | erl_parse().
--type erl_parse() :: erl_parse:abstract_form() | erl_parse:abstract_expr().
+-type erl_parse() :: erl_parse:abstract_clause()
+ | erl_parse:abstract_expr()
+ | erl_parse:abstract_form()
+ | erl_parse:abstract_type()
+ | erl_parse:form_info()
+ %% To shut up Dialyzer:
+ | {bin_element, _, _, _, _}.
+
%% The representation built by the Erlang standard library parser
%% `erl_parse'. This is a subset of the {@link syntaxTree()} type.