diff options
author | Tuncer Ayaz <[email protected]> | 2011-08-19 15:16:26 +0200 |
---|---|---|
committer | Tuncer Ayaz <[email protected]> | 2011-09-08 14:02:18 +0200 |
commit | 9520bbfc80f5e62ea39c921e8e2fc805857a8ca6 (patch) | |
tree | 4695c85ec6f416410b3f0848a86622f669225ddf | |
parent | ebb7283730e7ee09a8d7eececd69b4fe2f5438d5 (diff) | |
download | otp-9520bbfc80f5e62ea39c921e8e2fc805857a8ca6.tar.gz otp-9520bbfc80f5e62ea39c921e8e2fc805857a8ca6.tar.bz2 otp-9520bbfc80f5e62ea39c921e8e2fc805857a8ca6.zip |
yecc: use more descriptive name: 'werror'
-rw-r--r-- | lib/parsetools/src/yecc.erl | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/lib/parsetools/src/yecc.erl b/lib/parsetools/src/yecc.erl index d03435c441..e51de0da2e 100644 --- a/lib/parsetools/src/yecc.erl +++ b/lib/parsetools/src/yecc.erl @@ -138,10 +138,10 @@ compile(Input0, Output0, Input = shorten_filename(Input0), Output = shorten_filename(Output0), Includefile = lists:sublist(Includes, 1), - Werr = proplists:get_bool(warnings_as_errors, Specific), + Werror = proplists:get_bool(warnings_as_errors, Specific), Opts = [{parserfile,Output}, {includefile,Includefile}, {verbose,Verbose}, {report_errors, true}, {report_warnings, WarnLevel > 0}, - {warnings_as_errors, Werr}], + {warnings_as_errors, Werror}], case file(Input, Opts) of {ok, _OutFile} -> ok; @@ -414,13 +414,13 @@ infile(Parent, Infilex, Options) -> {error, Reason} -> add_error(St0#yecc.infile, none, {file_error, Reason}, St0) end, - case {St#yecc.errors, werr(St)} of + case {St#yecc.errors, werror(St)} of {[], false} -> ok; _ -> _ = file:delete(St#yecc.outfile) end, Parent ! {self(), yecc_ret(St)}. -werr(St) -> +werror(St) -> member(warnings_as_errors, St#yecc.options) andalso length(St#yecc.warnings) > 0. @@ -786,9 +786,9 @@ yecc_ret(St0) -> report_warnings(St), Es = pack_errors(St#yecc.errors), Ws = pack_warnings(St#yecc.warnings), - Werr = werr(St), + Werror = werror(St), if - Werr -> + Werror -> do_error_return(St, Es, Ws); Es =:= [] -> case member(return_warnings, St#yecc.options) of @@ -852,13 +852,13 @@ report_errors(St) -> end. report_warnings(St) -> - Werr = member(warnings_as_errors, St#yecc.options), - Prefix = case Werr of + Werror = member(warnings_as_errors, St#yecc.options), + Prefix = case Werror of true -> ""; false -> "Warning: " end, - ReportWerr = Werr andalso member(report_errors, St#yecc.options), - case member(report_warnings, St#yecc.options) orelse ReportWerr of + ReportWerror = Werror andalso member(report_errors, St#yecc.options), + case member(report_warnings, St#yecc.options) orelse ReportWerror of true -> foreach(fun({File,{none,Mod,W}}) -> io:fwrite(<<"~s: ~s~s\n">>, |