aboutsummaryrefslogtreecommitdiff
path: root/cljcc-compiler/src/cljcc/symbol.cljc
diff options
context:
space:
mode:
authorYour Name <agrawalshagun07@gmail.com>2025-03-16 02:01:52 +0530
committerYour Name <agrawalshagun07@gmail.com>2025-03-16 02:01:52 +0530
commit39b6930e14cfda58fd066805f5da447c685ab67f (patch)
tree2b0f2eae0d6eb3e6c99143d67db3177534a2c1c2 /cljcc-compiler/src/cljcc/symbol.cljc
parent0321df3708cfa4d1440faf3f407611df85484b4b (diff)
Rename all compiler files to cljc.
Diffstat (limited to 'cljcc-compiler/src/cljcc/symbol.cljc')
-rw-r--r--cljcc-compiler/src/cljcc/symbol.cljc50
1 files changed, 50 insertions, 0 deletions
diff --git a/cljcc-compiler/src/cljcc/symbol.cljc b/cljcc-compiler/src/cljcc/symbol.cljc
new file mode 100644
index 0000000..c410dac
--- /dev/null
+++ b/cljcc-compiler/src/cljcc/symbol.cljc
@@ -0,0 +1,50 @@
+(ns cljcc.symbol)
+
+;; Contains functions related to symbol table manipulation.
+
+(defn create-symbol [type attribute]
+ {:type type
+ :attribute attribute})
+
+(defn local-attribute []
+ {:type :local})
+
+(defn static-attribute [initial-value global?]
+ {:type :static
+ :initial-value initial-value
+ :global? global?})
+
+(defn fun-attribute [defined? global?]
+ {:type :fun
+ :defined? defined?
+ :global? global?})
+
+(defn no-initializer-iv []
+ {:type :no-initializer})
+
+(defn tentative-iv []
+ {:type :tentative})
+
+(defn initial-iv [static-init]
+ {:type :initial
+ :static-init static-init})
+
+(defn int-init [v]
+ {:type :int-init
+ :value v})
+
+(defn uint-init [v]
+ {:type :uint-init
+ :value v})
+
+(defn long-init [v]
+ {:type :long-init
+ :value v})
+
+(defn ulong-init [v]
+ {:type :ulong-init
+ :value v})
+
+(defn double-init [v]
+ {:type :double-init
+ :value v})