Liking cljdoc? Tell your friends :D

meme.tools.lexer

Generic scanlet builders for the Pratt parser engine.

Scanlet builders wrap language-specific consume functions into parselets that the grammar spec can reference. They bridge the gap between 'consume characters from source' and 'produce a CST node'.

Any language can use these builders with its own consume functions.

Generic scanlet builders for the Pratt parser engine.

Scanlet builders wrap language-specific consume functions into parselets
that the grammar spec can reference. They bridge the gap between
'consume characters from source' and 'produce a CST node'.

Any language can use these builders with its own consume functions.
raw docstring

atom-scanletclj/s

(atom-scanlet token-type consume-fn)

Build a scanlet that consumes chars via consume-fn, makes a token, returns atom node. consume-fn: (fn [^String source ^long len ^long pos] → end-pos)

Build a scanlet that consumes chars via consume-fn, makes a token, returns atom node.
consume-fn: (fn [^String source ^long len ^long pos] → end-pos)
sourceraw docstring

delimited-scanletclj/s

(delimited-scanlet node-type token-type close-char close-type)

Build a scanlet for an opening delimiter that parses children until close-char.

Build a scanlet for an opening delimiter that parses children until close-char.
sourceraw docstring

single-char-scanletclj/s

(single-char-scanlet token-type factory-parselet)

Build a scanlet for a single-character token that delegates to a factory parselet. factory-parselet: (fn [engine tok] → CST node)

Build a scanlet for a single-character token that delegates to a factory parselet.
factory-parselet: (fn [engine tok] → CST node)
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close