Liking cljdoc? Tell your friends :D

parcera.core


astclj/s

(ast input & {:as options})

Clojure (antlr4) parser. It can be used as:

  • (parcera/ast input-string) -> returns a lazy AST representation of input-string

The following options are accepted:

  • :unhide can be one of #{:tags :content :all}. Defaults to nil

NOTE: Antlr returns a fully parsed version of the provided input string however this function returns a lazy sequence in order to expose those through Clojure's immutable data structures

Clojure (antlr4) parser. It can be used as:
- `(parcera/ast input-string)`
   -> returns a lazy AST representation of input-string

 The following options are accepted:
 - `:unhide` can be one of `#{:tags :content :all}`. Defaults to `nil`

 NOTE: Antlr returns a fully parsed version of the provided input string
     however this function returns a lazy sequence in order to expose
     those through Clojure's immutable data structures
sourceraw docstring

codeclj/s

(code ast)

Transforms your AST back into code

ast: The nested sequence of [:keyword & content] which MUST follow the same structure as the result of (parcera/clojure input-string)

Returns a string representation of the provided AST

In general (= input (parcera/code (parcera/clojure input)))

Transforms your AST back into code

ast: The nested sequence of [:keyword & content] which MUST follow the
     same structure as the result of `(parcera/clojure input-string)`

Returns a string representation of the provided AST

In general (= input (parcera/code (parcera/clojure input)))
sourceraw docstring

default-hiddenclj/s

source

failure?clj/s

(failure? ast)

Checks if ast contains any ::failure instances.

NOTE: This function is potentially slow since it might have to check the complete ast to be sure that there are no failures.

Whenever possible, prefer to handle errors directly appearing in the ast

Checks if ast contains any `::failure` instances.

NOTE: This function is potentially slow since it might have to check the
complete ast to be sure that there are no failures.

Whenever possible, prefer to handle errors directly appearing in the ast
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close