@@ -18,8 +18,7 @@ defmodule ElixirScript.Translate.Function do
1818
1919 arg_matches_declaration = Helpers . declare_let ( "__arg_matches__" , J . identifier ( "null" ) )
2020
21- function_recur_dec = Helpers . function (
22- "recur" ,
21+ function_dec = Helpers . arrow_function (
2322 [ J . rest_element ( J . identifier ( "__function_args__" ) ) ] ,
2423 J . block_statement ( [
2524 arg_matches_declaration ,
@@ -36,15 +35,15 @@ defmodule ElixirScript.Translate.Function do
3635 ] )
3736 )
3837
39- function_dec = Helpers . arrow_function (
40- [ J . rest_element ( J . identifier ( "__function_args__" ) ) ] ,
41- J . block_statement ( [
42- function_recur_dec ,
43- J . return_statement (
44- trampoline ( )
45- )
46- ] )
47- )
38+ # function_dec = Helpers.arrow_function(
39+ # [J.rest_element(J.identifier("__function_args__"))],
40+ # J.block_statement([
41+ # function_recur_dec,
42+ # J.return_statement(
43+ # trampoline()
44+ # )
45+ # ])
46+ # )
4847
4948 state = Map . put ( state , :anonymous_fn , anonymous? )
5049 { function_dec , state }
@@ -59,8 +58,8 @@ defmodule ElixirScript.Translate.Function do
5958
6059 arg_matches_declaration = Helpers . declare_let ( "__arg_matches__" , J . identifier ( "null" ) )
6160
62- function_recur_dec = Helpers . function (
63- "recur" ,
61+ function_dec = Helpers . function (
62+ ElixirScript.Translate.Identifier . make_function_name ( name ) ,
6463 [ J . rest_element ( J . identifier ( "__function_args__" ) ) ] ,
6564 J . block_statement ( [
6665 arg_matches_declaration ,
@@ -77,16 +76,16 @@ defmodule ElixirScript.Translate.Function do
7776 ] )
7877 )
7978
80- function_dec = Helpers . function (
81- ElixirScript.Translate.Identifier . make_function_name ( name ) ,
82- [ J . rest_element ( J . identifier ( "__function_args__" ) ) ] ,
83- J . block_statement ( [
84- function_recur_dec ,
85- J . return_statement (
86- trampoline ( )
87- )
88- ] )
89- )
79+ # function_dec = Helpers.function(
80+ # ElixirScript.Translate.Identifier.make_function_name(name),
81+ # [J.rest_element(J.identifier("__function_args__"))],
82+ # J.block_statement([
83+ # function_recur_dec,
84+ # J.return_statement(
85+ # trampoline()
86+ # )
87+ # ])
88+ # )
9089
9190 { function_dec , state }
9291 end
@@ -135,7 +134,7 @@ defmodule ElixirScript.Translate.Function do
135134
136135 body = body
137136 |> Clause . return_last_statement
138- |> update_last_call ( state )
137+ # |> update_last_call(state)
139138
140139 declaration = Helpers . declare ( params , J . identifier ( "__arg_matches__" ) )
141140
0 commit comments