diff options
author | P. J. McDermott <pj@pehjota.net> | 2016-02-28 23:51:45 (EST) |
---|---|---|
committer | P. J. McDermott <pj@pehjota.net> | 2016-02-28 23:51:45 (EST) |
commit | 8deefba550f1223986961a60bf48a3692466ae66 (patch) | |
tree | 73c087afdaab08daa5b6f8db3d907defc7fb37e1 /eshtrans/backend | |
parent | 5fe3df1974d7e26d42d2729a60372e2f4c599bcd (diff) | |
download | eggshell-8deefba550f1223986961a60bf48a3692466ae66.zip eggshell-8deefba550f1223986961a60bf48a3692466ae66.tar.gz eggshell-8deefba550f1223986961a60bf48a3692466ae66.tar.bz2 |
eshtrans: Support "void" in parameter lists
Diffstat (limited to 'eshtrans/backend')
-rw-r--r-- | eshtrans/backend/codegen.esh | 7 |
1 files changed, 7 insertions, 0 deletions
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) |