summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--eshtrans/backend/codegen.esh14
-rw-r--r--eshtrans/tokens.esh4
2 files changed, 12 insertions, 6 deletions
diff --git a/eshtrans/backend/codegen.esh b/eshtrans/backend/codegen.esh
index ddd466b..9969d37 100644
--- a/eshtrans/backend/codegen.esh
+++ b/eshtrans/backend/codegen.esh
@@ -113,8 +113,7 @@ codegen_sub()
continue
;;
*)
- toktext T_STATIC
- printf ' '
+ printf '__static '
;;
esac
elif ${static_fname}; then
@@ -124,8 +123,7 @@ codegen_sub()
add_static_fn "${fname#*${US}}"
;;
*)
- toktext T_STATIC
- printf ' '
+ printf '__static '
toktext "${fname}"
;;
esac
@@ -153,6 +151,14 @@ codegen_sub()
printf '__fn_end; '
fi
;;
+ T_STATIC)
+ printf '__static '
+ continue
+ ;;
+ T_LOCAL)
+ printf '__local '
+ continue
+ ;;
esac
toktext "${t}"
diff --git a/eshtrans/tokens.esh b/eshtrans/tokens.esh
index 344ac9f..d8e57ca 100644
--- a/eshtrans/tokens.esh
+++ b/eshtrans/tokens.esh
@@ -132,8 +132,8 @@ toktext()
T_BANG) n='!';;
T_IN) n='in';;
T_USE) n='use';;
- T_STATIC) n='__static';;
- T_LOCAL) n='__local';;
+ T_STATIC) n='static';;
+ T_LOCAL) n='local';;
T_RETURN) n='return';;
# Special symbols
T_NAME) n="${t#*${US}}";;