Liking cljdoc? Tell your friends :D

stencil.parser


closing-sigilclj

(closing-sigil sigil)

Given a sigil (char), returns what its closing sigil could possibly be.

Given a sigil (char), returns what its closing sigil could possibly be.
sourceraw docstring

format-locationclj

(format-location sc)
(format-location s idx)

Given either a scanner or a string and index into the string, return a message describing the location by row and column.

Given either a scanner or a string and index into the string, return a
message describing the location by row and column.
sourceraw docstring

freeform-tag-sigilsclj

source

get-line-col-from-indexclj

(get-line-col-from-index s idx)

Given a string and an index into the string, returns which line of text the position is on. Specifically, returns an index containing a pair of numbers, the row and column.

Given a string and an index into the string, returns which line of text
the position is on. Specifically, returns an index containing a pair of
numbers, the row and column.
sourceraw docstring

parseclj

(parse template-string)
(parse template-string parser-state)
source

parse-tagclj

(parse-tag p)

Given a parser that is in tag position, reads the next tag and appends it to the output of the parser with appropriate processing.

Given a parser that is in tag position, reads the next tag and appends it
to the output of the parser with appropriate processing.
sourceraw docstring

parse-tag-nameclj

(parse-tag-name s)

This function takes a tag name (string) and parses it into a run-time data structure useful during rendering of the templates. Following the rules of mustache, it checks for a single ".", which indicates the implicit iterator. If not, it splits it on periods, returning a list of the pieces. See interpolation.yml in the spec.

This function takes a tag name (string) and parses it into a run-time data
structure useful during rendering of the templates. Following the rules of
mustache, it checks for a single ".", which indicates the implicit
iterator. If not, it splits it on periods, returning a list of
the pieces. See interpolation.yml in the spec.
sourceraw docstring

parse-textclj

(parse-text p)

Given a parser that is not in tag position, reads text until it is and appends it to the output of the parser.

Given a parser that is not in tag position, reads text until it is and
appends it to the output of the parser.
sourceraw docstring

parserclj

(parser scanner)
(parser scanner output)
(parser scanner output state)
source

parser-defaultsclj

source

standalone-tag-sigilsclj

source

tag-position?clj

(tag-position? s parser-state)

Takes a scanner and returns true if it is currently in "tag position." That is, if the only thing between it and the start of a tag is possibly some non-line-breaking whitespace padding.

Takes a scanner and returns true if it is currently in "tag position."
That is, if the only thing between it and the start of a tag is possibly some
non-line-breaking whitespace padding.
sourceraw docstring

valid-tag-contentclj

source

write-string-to-outputclj

(write-string-to-output zipper s)

Given a zipper and a string, adds the string to the zipper at the current cursor location (as zip/append-child would) and returns the new zipper. This function will collate adjacent strings and remove empty strings, so use it when adding strings to a parser's output.

Given a zipper and a string, adds the string to the zipper at the current
cursor location (as zip/append-child would) and returns the new zipper. This
function will collate adjacent strings and remove empty strings, so use it
when adding strings to a parser's output.
sourceraw docstring

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

× close