From d01830002a35988e3b3f234c38c697d782ca27d3 Mon Sep 17 00:00:00 2001 From: Raphael Roberts Date: Sun, 2 May 2021 03:08:38 -0500 Subject: [PATCH] Added unit special variable --- c2logic/compiler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/c2logic/compiler.py b/c2logic/compiler.py index 51a699d..23767a0 100644 --- a/c2logic/compiler.py +++ b/c2logic/compiler.py @@ -325,7 +325,7 @@ class Compiler(c_ast.NodeVisitor): varname = node.name if varname not in self.functions: varname = self.get_varname(varname) - if varname in ("links", "ipt", "counter", "time"): + if varname in ("links", "ipt", "counter", "time", "unit"): varname = "@" + varname self.push(Set("__rax", varname))