Liking cljdoc? Tell your friends :D

cljlex.core


add-patternclj

(add-pattern pattern-list pattern)

Adds the given pattern to the given pattern list.

Adds the given pattern to the given pattern list.
raw docstring

build-rule-listclj

(build-rule-list & patterns)

Builds a list of rules. Use with rule-run, rule-ignore and rule-throw.

Builds a list of rules. Use with rule-run, rule-ignore and rule-throw.
raw docstring

handle-matchers-and-rulesclj

(handle-matchers-and-rules string pos matcher-list rule-list)
(handle-matchers-and-rules string pos index matcher-list rule-list)

Handles patterns and rules. If there was a match, handles it's respective rule, and returns the new position directly after the match. Otherwise, nil.

Handles patterns and rules.
If there was a match, handles it's respective rule, and returns the new position directly after the match. Otherwise, nil.
raw docstring

lexclj

(lex string rule-list)

Using the given rules, lex the given string.

Using the given rules, lex the given string.
raw docstring

make-lexer-exceptionclj

(make-lexer-exception string-index)
(make-lexer-exception string-index reason)

Makes a new lexer exception with ex-info.

Makes a new lexer exception with ex-info.
raw docstring

matcher-nextclj

(matcher-next string position matcher)

Attempts, using the given matcher, to match the string starting at the given position. If the match was successful, returns the matched piece of the string, otherwise, nil.

Attempts, using the given matcher, to match the string starting at the given position.
If the match was successful, returns the matched piece of the string, otherwise, nil.
raw docstring

rule-ignoreclj

(rule-ignore pattern)

Makes a rule with a regex pattern that will be ignored during lexing.

Makes a rule with a regex pattern that will be ignored during lexing.
raw docstring

rule-runclj

(rule-run pattern f)

Makes a rule associating a regex pattern to a function. While lexing, f is given the pattern that was matched, and should have the signature [^String].

Makes a rule associating a regex pattern to a function.
While lexing, f is given the pattern that was matched, and should have the signature [^String].
raw docstring

rule-throwclj

(rule-throw pattern reason)

Makes a rule with a regex pattern that will throw an exception with the given reason during lexing.

Makes a rule with a regex pattern that will throw an exception with the given reason during lexing.
raw 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