Clean up parse-tuple

This commit is contained in:
Scott Richmond 2022-02-21 13:46:41 -05:00
parent e6b204a54a
commit 61b25ca22d

View File

@ -139,9 +139,7 @@
members []
current_member nil
]
(let [
curr (current parser)
]
(let [curr (current parser)]
(case (token-type parser)
::token/rparen (let [ms (add-member members current_member)]
(assoc (advance parser) ::ast
@ -161,12 +159,7 @@
(panic origin "Unterminated tuple" ::token/eof)
(let [parsed (parse-expr parser)]
(recur parsed members (::ast parsed))
)
)
)
)
)
(recur parsed members (::ast parsed)))))))
(defn- parse-list [parser]
(loop [parser (advance parser)