diff options
author | Kostis Sagonas <[email protected]> | 2010-10-05 14:08:59 +0300 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2010-10-05 14:55:56 +0200 |
commit | 44d6f54d6782d63a25d80f6d920d67adb33bda52 (patch) | |
tree | a3ab2dd639ba2a56506901b6a0297c012b0e217f /lib/syntax_tools/src/igor.erl | |
parent | 3cfec17ff7aff97c5ec862a8b9e97d245849f9c3 (diff) | |
download | otp-44d6f54d6782d63a25d80f6d920d67adb33bda52.tar.gz otp-44d6f54d6782d63a25d80f6d920d67adb33bda52.tar.bz2 otp-44d6f54d6782d63a25d80f6d920d67adb33bda52.zip |
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()) }). |