anchor.diff:  toksFunc({{_, _, {FunctionName, Arity}}, {_, [compiler_generated], _, _}})->
       {atom_to_list(FunctionName)++"/"++integer_to_list(Arity),esast:functionExpression(esast:identifier("compiler_generated"),[],esast:blockStatement([esast:emptyStatement()]),false)};
   toksFunc({{_, _, {FunctionName, Arity}}, {_, _, ParamNames, Body}})->
  -	%io:format("    function: ~s/~w ~n", [FunctionName, Arity]),
  -	%io:format("        parameters: ~p ~n", [tupleList_getVars_3(ParamNames)]),
  -    {atom_to_list(FunctionName)++"/"++integer_to_list(Arity),esast:functionExpression(esast:identifier("null"),[],esast:blockStatement([toksFuncBody(Body)]),false)}.
  +    {atom_to_list(FunctionName)++"/"++integer_to_list(Arity),esast:functionExpression(esast:identifier("null"),[],esast:blockStatement([toksFuncBody(return,Body)]),false)}.
   
   
   %Parse the function body
  -toksFuncBody({c_call, _, {_, _, Module}, {_, _, FunctionName}, Params})->
  +toksFuncBody(return,{c_call, _, {_, _, Module}, {_, _, FunctionName}, Params})->
   	%io:format("        call function ~s:~s(", [Module, FunctionName]),
   	%io:format("~p)~n", [tupleList_getVars_3(Params)]);
       io:format("",[]);
   	
  -toksFuncBody({c_case, _, Condition, Clauses})->
  -	%io:format("        case statement:"),
  -	%toksFuncBody(Condition),
  -	%toksClauses(Clauses);
  -    io:format("",[]);
  -	
  -toksFuncBody({c_values, _, Values})->
  +toksFuncBody(return,{c_values, _, Values})->
   	%io:format("~p~n", [tupleList_getVars_3(Values)]);
       io:format("",[]);
   
  -toksFuncBody({c_var, _, Var})->
  +toksFuncBody(return,{c_var, _, Var})->
   	%io:format("~p~n",[Var]);
       io:format("",[]);
   	
  -toksFuncBody({c_seq, _, A, B})->
  +toksFuncBody(return,{c_seq, _, A, B})->
   	%toksFuncBody(A),
   	%toksFuncBody(B);
       io:format("",[]);
   	
  -toksFuncBody({c_let, _, [{_, _, Variable}], A, B})->
  +toksFuncBody(return,{c_let, _, [{_, _, Variable}], A, B})->
   	%io:format("        Let statement: ~s~n", [Variable]),
   	%toksFuncBody(A),
   	%toksFuncBody(B);
       io:format("",[]);
   	
   % Is apply a local function call? Assignment from function? Assignment with pattern matching?
  -toksFuncBody({c_apply, _, {_,_,{FName,_Arity}}, Params})->
  +toksFuncBody(return,{c_apply, _, {_,_,{FName,_Arity}}, Params})->
   	%io:format("Call local function ~s(",[FName]),
   	%io:format("~p)~n", [tupleList_getVars_3(Params)]);
       io:format("",[]);
   
  -toksFuncBody({c_apply, _, _A, _B})->
  +toksFuncBody(return,{c_apply, _, _A, _B})->
   	%io:format("        Apply statement: ~n");
       io:format("",[]);
   	
  -toksFuncBody({c_literal,_,Value})->
  -	%io:format("        Literal ~p~n", [Value]);
  +toksFuncBody(return,{c_literal,_,Value})->
   	esast:returnStatement(esast:literal(Value));
  -    %io:format("~p~n",[Value]);
  +toksFuncBody(_,{c_literal,_,Value})->
  +	esast:literal(Value);
   
  -toksFuncBody({c_tuple,_,Values})->
  +toksFuncBody(return,{c_tuple,_,Values})->
   	%io:format("        Tuple ~p~n", [tupleList_getVars_3(Values)]);
       io:format("",[]);
       
  -toksFuncBody({c_primop,_,{_,_,Type},Details})->
  +toksFuncBody(return,{c_primop,_,{_,_,Type},Details})->
       % io:format("        Error? ~p~n~p~n", [Type,Details]),
       esast:error(atom_to_list(Type),"TODO Errors dont parse nicely",esast:literal("Message"));
       % io:format("",[]);
       
  +toksFuncBody(return,{c_case, _, Condition, Clauses})->
  +	%io:format("        case statement:"),
  +	%toksFuncBody(noreturn,Condition),
  +	%lists:map(fun({c_clause,_,MatchVals,_true,Body})->toksFuncBody(return,Body) end,Clauses).
  +    io:format("",[]);
       
  -toksFuncBody(T)->
  +toksFuncBody(_,T)->
       io:format("Unrecognised Token in function body: ~p", [T]).
   
  -%Loop through case clauses
  -toksClauses([])->ok;
  -toksClauses([{c_clause,_,MatchVals,_true,Body}|Rest])->
  -    % io:format("Clause:~p~n",[MatchVals]),
  -    toksFuncBody(Body),
  -    toksClauses(Rest).
   
   
   
  
positive.code:     [Val | tupleList_getVars_3(Body)];
  tupleList_getVars_3([{_, _, Val, _} | Body])->
      [Val | tupleList_getVars_3(Body)].
  
  readTokens([])->
      io:format("Done.",[]);
  readTokens([T | Body])->
      io:format("~p\n", [T]),
      readTokens(Body).
  
  rAtomToList([A|Rest])->
      [rAtomToList(A)|rAtomToList(Rest)];
  
negative.code: % Walks down a CoreErlang AST and calls EStree.
  
  -module(asttrans).
  -export([erast2esast/1]).
  
  % Compiles a given Erlang source file to a EStree ast
  erast2esast(AST) ->
      toksModule(AST).
  
  %Read the module token (first token)
  toksModule({c_module, _A, {_, _, ModuleName}, Exports, _Attributes, Functions})->
  