summaryrefslogtreecommitdiff
path: root/lib/compiler/src/compile.erl
diff options
context:
space:
mode:
Diffstat (limited to 'lib/compiler/src/compile.erl')
-rw-r--r--lib/compiler/src/compile.erl13
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/compiler/src/compile.erl b/lib/compiler/src/compile.erl
index ec0414cdda..847ea484ba 100644
--- a/lib/compiler/src/compile.erl
+++ b/lib/compiler/src/compile.erl
@@ -1018,12 +1018,25 @@ do_parse_module(DefEncoding, #compile{ifile=File,options=Opts,dir=Dir}=St) ->
false ->
1
end,
+
+ %% FIXME: Rewrite this when the enable feature EEP has been implemented.
+ ResWordFun = case proplists:get_value(enable_feature, Opts, []) of
+ maybe_expr ->
+ fun('maybe') -> true;
+ ('else') -> true;
+ (Other) -> erl_scan:reserved_word(Other)
+ end;
+ _ ->
+ fun erl_scan:reserved_word/1
+ end,
+
R = epp:parse_file(File,
[{includes,[".",Dir|inc_paths(Opts)]},
{source_name, SourceName},
{macros,pre_defs(Opts)},
{default_encoding,DefEncoding},
{location,StartLocation},
+ {reserved_word_fun,ResWordFun},
extra]),
case R of
{ok,Forms0,Extra} ->