From 8deefba550f1223986961a60bf48a3692466ae66 Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Sun, 28 Feb 2016 23:51:45 -0500 Subject: eshtrans: Support "void" in parameter lists --- (limited to 'eshtrans/backend') diff --git a/eshtrans/backend/codegen.esh b/eshtrans/backend/codegen.esh index 2637d51..b9e2c10 100644 --- a/eshtrans/backend/codegen.esh +++ b/eshtrans/backend/codegen.esh @@ -113,6 +113,10 @@ codegen_sub() types="${types}${t#*${US}}:" continue ;; + T_VOID) + params=-1 + continue + ;; T_COMMA) continue ;; @@ -164,6 +168,9 @@ codegen_sub() printf ' __check_args %s %d %s %s;' \ "${fname#*${US}}" ${params} \ "'${types% }'" '"${@}"' + elif [ ${params} -eq -1 ]; then + printf ' __check_args %s 0 "" "${@}";' \ + "${fname#*${US}}" fi ;; T_FN_END) -- cgit v0.9.1