summaryrefslogtreecommitdiffstats
path: root/eshtrans/backend
diff options
context:
space:
mode:
Diffstat (limited to 'eshtrans/backend')
-rw-r--r--eshtrans/backend/codegen.esh10
-rw-r--r--eshtrans/backend/main.esh1
2 files changed, 11 insertions, 0 deletions
diff --git a/eshtrans/backend/codegen.esh b/eshtrans/backend/codegen.esh
index 8d77ce9..a9c3cef 100644
--- a/eshtrans/backend/codegen.esh
+++ b/eshtrans/backend/codegen.esh
@@ -109,3 +109,13 @@ sh_parse_stack()
done
codegen_sub "${array}"
}
+
+sh_set_tu_id()
+{
+ local toks="${1}"
+
+ tu_id="$(printf '%s' "${toks}" | sha256sum -)"
+ tu_id="${tu_id% -}"
+
+ return 0
+}
diff --git a/eshtrans/backend/main.esh b/eshtrans/backend/main.esh
index 884a2c3..485e9be 100644
--- a/eshtrans/backend/main.esh
+++ b/eshtrans/backend/main.esh
@@ -23,6 +23,7 @@ sh_codegen()
local toks="${1}"
shift 1
+ sh_set_tu_id "${toks}"
if printf '%s' "${toks}" | sh_parse_stack; then
return 0
else