allow c and c++ style comments anywhere whitespace is legal

This commit is contained in:
alisdair sullivan 2012-03-19 14:34:07 -07:00
parent d2950ab8c7
commit e3c883457f
3 changed files with 271 additions and 4 deletions

View file

@ -47,6 +47,8 @@ parse_opts([single_quotes|Rest], Opts) ->
parse_opts(Rest, Opts#opts{single_quotes=true});
parse_opts([no_jsonp_escapes|Rest], Opts) ->
parse_opts(Rest, Opts#opts{no_jsonp_escapes=true});
parse_opts([comments|Rest], Opts) ->
parse_opts(Rest, Opts#opts{comments=true});
parse_opts(_, _) ->
{error, badarg}.
@ -57,7 +59,8 @@ valid_flags() ->
escape_forward_slash,
explicit_end,
single_quotes,
no_jsonp_escapes
no_jsonp_escapes,
comments
].