From 552c41552c71c7bb3c0497d8b92c52688a14d22b Mon Sep 17 00:00:00 2001 From: Shagun Agrawal Date: Fri, 30 Aug 2024 20:01:01 +0530 Subject: Add parsing for conditional and if statements --- src/cljcc/token.clj | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/cljcc/token.clj') 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 -- cgit v1.2.3