Liking cljdoc? Tell your friends :D
Clojure only.

mermaid-processor.parse-utils


result-or-exceptionclj

(result-or-exception parse-result)

Works out if a parse has failed and if so throws an error

ARGUMENTS:

  • parse-result: the result from instaparse.core/parser.

RETURN: parse-result unaltered as the abstract syntax tree

EXAMPLE:

(result-or-exception (parser input))

THROWS: ExceptionInfo if the parse-result was a parse error instead of an AST.

Works out if a parse has failed and if so throws an error

ARGUMENTS:
- parse-result: the result from instaparse.core/parser.

RETURN:
parse-result unaltered as the abstract syntax tree

EXAMPLE:
```
(result-or-exception (parser input))
```
THROWS:
ExceptionInfo if the parse-result was a parse error instead of an AST.
sourceraw docstring

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

× close