diff options
| author | Shagun Agrawal <agrawalshagun07@gmail.com> | 2024-08-30 20:01:01 +0530 |
|---|---|---|
| committer | Shagun Agrawal <agrawalshagun07@gmail.com> | 2024-08-30 20:01:01 +0530 |
| commit | 552c41552c71c7bb3c0497d8b92c52688a14d22b (patch) | |
| tree | 2838eea40aacc7831cf188303eca70dc3d742b7a /src/cljcc/token.clj | |
| parent | 276b0c200e5159b1d099ff85aab544480c2ac757 (diff) | |
Add parsing for conditional and if statements
Diffstat (limited to 'src/cljcc/token.clj')
| -rw-r--r-- | src/cljcc/token.clj | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/cljcc/token.clj b/src/cljcc/token.clj index 883dda8..2da74fd 100644 --- a/src/cljcc/token.clj +++ b/src/cljcc/token.clj @@ -107,6 +107,8 @@ :logical-or 10 + :question 5 + :assignment 1 :assignment-plus 1 :assignment-multiply 1 @@ -128,6 +130,8 @@ (def chrs-kind-map {\( :left-paren \) :right-paren + \? :question + \: :colon \{ :left-curly \} :right-curly \= :assignment @@ -170,6 +174,8 @@ "return" :kw-return "void" :kw-void "int" :kw-int + "if" :kw-if + "else" :kw-else :identifier)) (defn create |
