anchor.diff:  module(Mfs, #cinfo{opts=Opts,file=File}) ->
       St0 = #lfe_cg{opts=Opts,file=File},
       {AST,St1} = compile_module(Mfs, St0),
  -    {ok,St1#lfe_cg.module,AST,[]}.
  +    return_status(AST, St1).
  +
  +return_status(AST, #lfe_cg{module=M,errors=[]}=St) ->
  +    {ok,M,AST,St#lfe_cg.warnings};
  +return_status(_AST, St) ->
  +    {error,St#lfe_cg.errors,St#lfe_cg.warnings}.
   
   compile_module(Mfs, St0) ->
       %% Collect all the module attributes and output them first.
       St1 = collect_mod_defs(Mfs, St0),
       Attrs = compile_attributes(St1),
  -    %% Now we do the meta, function and record forms in order.
  -    Forms = compile_forms(Mfs, St1),
  -    {Attrs ++ Forms,St1}.
  +    %% Now we do the meta, function and record forms in order. Here we
  +    %% can get translation errors.
  +    %% Forms = compile_forms(Mfs, St1),
  +    {Forms,St2} =
  +        try
  +            {compile_forms(Mfs, St1),St1}
  +        catch
  +            error:{illegal_code,Line,Code} ->
  +                {[],add_error(Line, {illegal_code,Code}, St1)}
  +        end,
  +    {Attrs ++ Forms,St2}.
   
   %% collect_mod_defs(ModuleForms, State) -> State.
   %%  Collect the attributee information in define-module and
  
positive.code:         {ok,Val} -> Val;
          error -> Def
      end.
  
negative.code:                  defs=[],                       %Defined top-level functions
                   opts=[],                       %Options
                   file=[],                       %File name
                   func=[],                       %Current function
                   errors=[],                     %Errors
                   warnings=[]                    %Warnings
              }).
  
  %% Errors.
  format_error({illegal_code,Code}) ->
      lfe_io:format1(<<"illegal ~w code">>, [Code]).
  
  %% module(ModuleForms, CompInfo) ->
  %%     {ok,ModuleName,ASTModule,[Warning]} | {error,[Error],[Warning]}.
  