Liking cljdoc? Tell your friends :D

alda.parser


check-for-failureclj

(check-for-failure x)

Determines whether its input is an Instaparse failure, throwing an exception if it is. If it isn't, passes it through so we can continue parsing.

Determines whether its input is an Instaparse failure, throwing an exception
if it is. If it isn't, passes it through so we can continue parsing.
sourceraw docstring

clj-expr-transformsclj

source

comment-parserclj

source

header-parserclj

source

name-transformsclj

source

number-transformsclj

source

parse-headerclj

(parse-header mode cache header)

Parses the (optional) string of non-instrument-specific events that may occur at the beginning of an Alda score (e.g. setting variables, global attributes, inline Clojure code).

Parses the (optional) string of non-instrument-specific events that may
occur at the beginning of an Alda score (e.g. setting variables, global
attributes, inline Clojure code).
sourceraw docstring

parse-inputclj

(parse-input alda-code & [mode])

Parses a string of Alda code.

If mode is:

:lisp -- the output is Clojure code using the alda.lisp DSL (default) :map -- the output is the map of score data that would result from evaluating the code :events -- the output is a vector of events, which, when supplied as the arguments to alda.lisp/score, will result in the aforementioned map of score data

Parses a string of Alda code.

If `mode` is:

  :lisp   -- the output is Clojure code using the alda.lisp DSL (default)
  :map    -- the output is the map of score data that would result from
  evaluating the code
  :events -- the output is a vector of events, which, when supplied as the
  arguments to alda.lisp/score, will result in the aforementioned
  map of score data
sourceraw docstring

parse-partclj

(parse-part mode cache part)

Parses the events of a single call to an instrument part.

Parses the events of a single call to an instrument part.
sourceraw docstring

part-parserclj

source

remove-commentsclj

(remove-comments [input cache])

Strips comments from a string of Alda code.

We have to also parse Clojure expressions at this stage in order to avoid ambiguity between Alda comments and portions of Clojure expressions. But we don't want to have to parse the Clojure expressions again later, so we cache them and return them along with the code.

Strips comments from a string of Alda code.

We have to also parse Clojure expressions at this stage in order to avoid
ambiguity between Alda comments and portions of Clojure expressions. But we
don't want to have to parse the Clojure expressions again later, so we cache
them and return them along with the code.
sourceraw docstring

score-parserclj

source

separate-partsclj

(separate-parts [input cache])

Separates out instrument parts (including subsequent calls to existing parts).

Separates out instrument parts (including subsequent calls to existing
parts).
sourceraw docstring

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

× close