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/erl_syntax_lib.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/erl_syntax_lib.erl')
-rw-r--r-- | lib/syntax_tools/src/erl_syntax_lib.erl | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/lib/syntax_tools/src/erl_syntax_lib.erl b/lib/syntax_tools/src/erl_syntax_lib.erl index 4808971a59..daef74e874 100644 --- a/lib/syntax_tools/src/erl_syntax_lib.erl +++ b/lib/syntax_tools/src/erl_syntax_lib.erl @@ -1134,21 +1134,21 @@ collect_attribute(_, {N, V}, Info) -> %% Abstract datatype for collecting module information. --record(forms, {module, exports, module_imports, imports, attributes, - records, errors, warnings, functions, rules}). +-record(forms, {module = none :: 'none' | {'value', atom()}, + exports = [] :: [{atom(), arity()}], + module_imports = [] :: [atom()], + imports = [] :: [{atom(), [{atom(), arity()}]}], + attributes = [] :: [{atom(), term()}], + records = [] :: [{atom(), [{atom(), field_default()}]}], + errors = [] :: [term()], + warnings = [] :: [term()], + functions = [] :: [{atom(), arity()}], + rules = [] :: [{atom(), arity()}]}). + +-type field_default() :: 'none' | erl_syntax:syntaxTree(). new_finfo() -> - #forms{module = none, - exports = [], - module_imports = [], - imports = [], - attributes = [], - records = [], - errors = [], - warnings = [], - functions = [], - rules = [] - }. + #forms{}. finfo_set_module(Name, Info) -> case Info#forms.module of |