diff options
author | Micael Karlberg <[email protected]> | 2011-04-01 12:07:23 +0200 |
---|---|---|
committer | Micael Karlberg <[email protected]> | 2011-04-01 12:07:23 +0200 |
commit | 2b46b0e42fe95d99619ffa343537c8468e27295c (patch) | |
tree | 9f01a4f4a6ad597299aa5a74e5e50a58e9d5812b /lib/typer | |
parent | 537f010d6fe871d55c3becb02fe6ebb73dc2d55a (diff) | |
parent | 49737813349f164b35737eb3cd59491930128f58 (diff) | |
download | otp-2b46b0e42fe95d99619ffa343537c8468e27295c.tar.gz otp-2b46b0e42fe95d99619ffa343537c8468e27295c.tar.bz2 otp-2b46b0e42fe95d99619ffa343537c8468e27295c.zip |
Merge branch 'bmk/snmp/manager/deprecate_old_api/OTP-9174' into bmk/snmp/snmp420_integration
Conflicts:
lib/snmp/doc/src/notes.xml
lib/snmp/src/app/snmp.appup.src
Diffstat (limited to 'lib/typer')
-rw-r--r-- | lib/typer/src/typer.erl | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/lib/typer/src/typer.erl b/lib/typer/src/typer.erl index fc8caa4f21..e40c4f39cd 100644 --- a/lib/typer/src/typer.erl +++ b/lib/typer/src/typer.erl @@ -628,6 +628,8 @@ cl(["-T"|Opts]) -> cl(["-r"|Opts]) -> {Files, RestOpts} = dialyzer_cl_parse:collect_args(Opts), {{files_r, Files}, RestOpts}; +cl(["-pa",Dir|Opts]) -> {{pa,Dir}, Opts}; +cl(["-pz",Dir|Opts]) -> {{pz,Dir}, Opts}; cl(["-"++H|_]) -> fatal_error("unknown option -"++H); cl(Opts) -> {Files, RestOpts} = dialyzer_cl_parse:collect_args(Opts), @@ -672,7 +674,13 @@ analyze_result({plt, Plt}, Args, Analysis) -> analyze_result(show_succ, Args, Analysis) -> {Args, Analysis#analysis{show_succ = true}}; analyze_result(no_spec, Args, Analysis) -> - {Args, Analysis#analysis{no_spec = true}}. + {Args, Analysis#analysis{no_spec = true}}; +analyze_result({pa, Dir}, Args, Analysis) -> + code:add_patha(Dir), + {Args, Analysis}; +analyze_result({pz, Dir}, Args, Analysis) -> + code:add_pathz(Dir), + {Args, Analysis}. %%-------------------------------------------------------------------- %% File processing. @@ -1009,7 +1017,8 @@ version_message() -> help_message() -> S = <<" Usage: typer [--help] [--version] [--plt PLT] [--edoc] [--show | --show-exported | --annotate | --annotate-inc-files] - [-Ddefine]* [-I include_dir]* [-T application]* [-r] file* + [-Ddefine]* [-I include_dir]* [-pa dir]* [-pz dir]* + [-T application]* [-r] file* Options: -r dir* @@ -1039,6 +1048,10 @@ help_message() -> -I include_dir pass the include_dir to TypEr (The syntax of includes is the same as that used by \"erlc\".) + -pa dir + -pz dir + Set code path options to TypEr + (This is useful for files that use parse tranforms.) --version (or -v) prints the Typer version and exits --help (or -h) |