Parse parse¶
Parses a string into an expression without evaluating it.
;; Parse a simple expression
↪ (parse "(+ 1 2)")
(
+
1
2
)
;; Parse a function definition
↪ (parse "(fn [x] (* x 2))")
@(null)
;; Parse multiple expressions
↪ (parse "(set x 10) (+ x 20)")
(
do
(set x 10)
(+ x 20)
)
Warning
- Input must be a string
- Returns parsed expression without evaluating
- Useful for inspecting code structure