diff options
author | Björn Gustavsson <[email protected]> | 2010-10-06 14:31:42 +0200 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2010-10-06 14:31:42 +0200 |
commit | b7c6b7d8082f4df2d0888292e2a2180cc60ebab2 (patch) | |
tree | 4aa994eaa97d300945fc2d299b1d72688de8106a /lib/syntax_tools/src/igor.erl | |
parent | 90b514aa9f2aa35b93136ea9776543d8e4461f41 (diff) | |
parent | 44d6f54d6782d63a25d80f6d920d67adb33bda52 (diff) | |
download | otp-b7c6b7d8082f4df2d0888292e2a2180cc60ebab2.tar.gz otp-b7c6b7d8082f4df2d0888292e2a2180cc60ebab2.tar.bz2 otp-b7c6b7d8082f4df2d0888292e2a2180cc60ebab2.zip |
Merge branch 'ks/syntax_tools-types' into dev
* ks/syntax_tools-types:
syntax_tools: Add types to record definitions
Diffstat (limited to 'lib/syntax_tools/src/igor.erl')
-rw-r--r-- | lib/syntax_tools/src/igor.erl | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/lib/syntax_tools/src/igor.erl b/lib/syntax_tools/src/igor.erl index 702b399615..7ec62f1dba 100644 --- a/lib/syntax_tools/src/igor.erl +++ b/lib/syntax_tools/src/igor.erl @@ -1035,7 +1035,12 @@ make_stub(M, Map, Env) -> %% Removing and/or out-commenting program forms. The returned form %% sequence tree is not necessarily flat. --record(filter, {records :: set(), file_attributes, attributes}). +-type atts() :: 'delete' | 'kill'. +-type file_atts() :: 'delete' | 'keep' | 'kill'. + +-record(filter, {records :: set(), + file_attributes :: file_atts(), + attributes :: atts()}). filter_forms(Tree, Env) -> Forms = erl_syntax:form_list_elements( @@ -1576,6 +1581,8 @@ alias_expansions_2(Modules, Table) -> %% --------------------------------------------------------------------- %% Merging the source code. +-type map_fun() :: fun(({atom(), integer()}) -> {atom(), integer()}). + %% Data structure for code transformation environment. -record(code, {module :: atom(), @@ -1586,11 +1593,10 @@ alias_expansions_2(Modules, Table) -> preserved :: boolean(), no_headers :: boolean(), notes :: notes(), - map, % = ({atom(), int()}) -> {atom(), int()} - renaming, % = (atom()) -> ({atom(), int()}) -> - % {atom(), int()} - expand :: dict(), % = dict({atom(), int()}, - % {atom(), {atom(), int()}}) + map :: map_fun(), + renaming :: fun((atom()) -> map_fun()), + expand :: dict(), % = dict({atom(), integer()}, + % {atom(), {atom(), integer()}}) redirect :: dict() % = dict(atom(), atom()) }). |