Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Limit the warning suppression to combinator and support functions.

  • Loading branch information...
commit d71257822afdb7928916a5c604cde89aab803b0d 1 parent 86e0957
@seancribbs authored
Showing with 4 additions and 4 deletions.
  1. +1 −1  src/peg_gen.erl
  2. +3 −3 src/peg_meta.erl
View
2  src/peg_gen.erl
@@ -53,7 +53,7 @@ generate_module_attrs(ModName) ->
% some way, but hides warnings about unused parser combinators.
% In a future version we should just emit the used combinators,
% excluding the rest.
- "-compile(nowarn_unused_function).\n\n",
+ "-compile({nowarn_unused_function,[p/4, p/5, p_eof/0, p_optional/1, p_not/1, p_assert/1, p_seq/1, p_and/1, p_choose/1, p_zero_or_more/1, p_one_or_more/1, p_label/2, p_string/1, p_anything/0, p_charclass/1]}).\n\n",
"file(Filename) -> {ok, Bin} = file:read_file(Filename), parse(binary_to_list(Bin)).\n\n",
"parse(Input) ->\n",
" setup_memo('", atom_to_list(ModName),"'),\n",
View
6 src/peg_meta.erl
@@ -1,12 +1,12 @@
-module(peg_meta).
-export([parse/1,file/1]).
--compile(nowarn_unused_function).
+-compile({nowarn_unused_function,[p/4, p/5, p_eof/0, p_optional/1, p_not/1, p_assert/1, p_seq/1, p_and/1, p_choose/1, p_zero_or_more/1, p_one_or_more/1, p_label/2, p_string/1, p_anything/0, p_charclass/1]}).
file(Filename) -> {ok, Bin} = file:read_file(Filename), parse(binary_to_list(Bin)).
parse(Input) ->
- setup_memo(peg_meta),
- Result = case rules(Input,{{line,1},{column,1}}) of
+ setup_memo('peg_meta'),
+ Result = case 'rules'(Input,{{line,1},{column,1}}) of
{AST, [], _Index} -> AST;
Any -> Any
end,
Please sign in to comment.
Something went wrong with that request. Please try again.