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/frontend/lexer.esh') diff --git a/eshtrans/frontend/lexer.esh b/eshtrans/frontend/lexer.esh index 275e928..a30e7f5 100644 --- a/eshtrans/frontend/lexer.esh +++ b/eshtrans/frontend/lexer.esh @@ -954,6 +954,21 @@ accept() tok="${t}" fi ;; + T_VOID) + # Types are recognized as literal T_WORDs. + if ! [ "x${tok%%${US}*}" = 'xT_WORD' ]; then + return 1 + fi + # Validate type. + case "${tok#*${US}}" in + 'void') + ;; + *) + return 1 + ;; + esac + tok="T_VOID${US}${tok#T_WORD${US}}" + ;; T_TYPE) # Types are recognized as literal T_WORDs. if ! [ "x${tok%%${US}*}" = 'xT_WORD' ]; then -- cgit v0.9.1