summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorP. J. McDermott <pj@pehjota.net>2016-02-22 13:48:43 (EST)
committer P. J. McDermott <pj@pehjota.net>2016-02-22 13:48:43 (EST)
commit03d22c23782f10abbb71fc9f039f80cebd5fea29 (patch)
treeda6b68d3f0f4989d2eadb8e2a6827f97d0b4ee90
parent8bf52cfc5499dbb1f6502495925cbc6c9b5a4274 (diff)
downloadeggshell-03d22c23782f10abbb71fc9f039f80cebd5fea29.zip
eggshell-03d22c23782f10abbb71fc9f039f80cebd5fea29.tar.gz
eggshell-03d22c23782f10abbb71fc9f039f80cebd5fea29.tar.bz2
eshtrans/frontend: Add inject() function
-rw-r--r--eshtrans/frontend/lexer.esh9
1 files changed, 9 insertions, 0 deletions
diff --git a/eshtrans/frontend/lexer.esh b/eshtrans/frontend/lexer.esh
index 8f83a1a..b7d0886 100644
--- a/eshtrans/frontend/lexer.esh
+++ b/eshtrans/frontend/lexer.esh
@@ -1034,3 +1034,12 @@ expect()
synexp "${t}"
fi
}
+
+inject()
+{
+ local t="${1}"
+ shift 1
+
+ tokens="${tokens}${t}${RS}"
+ return 0
+}