(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.
(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.
(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.
(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.
(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.
(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.
(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.
(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.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close