anchor.diff:  %%%
   %%% Parses a top-level S-expression and converts it to an abstract syntax
   %%% tree (AST).
  +%%%
  +%%% Checks bindings, variable references, and export declarations. (This is not
  +%%% postponed to a "lint" module since this processing is needed anyway in order
  +%%% to generate correct AST for variable references and ":" operands.)
   %%%
   %%% Notes:
   %%% - Variadic functions (with "rest" parameters) are not supported, since
  
positive.code: module(Sexprs) ->
    {Name, Sexprs1} = parse_module_decl(Sexprs),
    {Exports, Sexprs2} = parse_export_decl(Sexprs1),
    Defuns = parse_defuns(Sexprs2),
    {'ES:MODULE', Name, Exports, Defuns}.
  
  -spec toplevel(sexpr()) -> ast().
  toplevel(Sexpr) ->
    parse(Sexpr, es_env:empty(), true).
  
  %% Internals -------------------------------------------------------------------
  
  parse_module_decl(Sexprs) ->
    case Sexprs of
  
negative.code:       {'ES:QUOTE', Atom};
      _ ->
        case es_env:lookup(Env, Atom) of
          {value, []} ->
            {'ES:LOCVAR', Atom};
          {value, A} when is_integer(A) ->
            {'ES:GLOVAR', Atom};
          none ->
            {'ES:GLOVAR', Atom}
        end
  