Liking cljdoc? Tell your friends :D

paco.detail.source


at?clj/s

(at? source mark)

Returns true if the source is in the state represented by mark.

Returns true if the source is in the state represented by `mark`.
sourceraw docstring

backtrack!clj/s

(backtrack! source mark)

Restores the source to the state represented by mark.

Restores the source to the state represented by `mark`.
sourceraw docstring

backtrack-modified!clj/s

(backtrack-modified! source state)

Like backtrack!, but does not reset the modcount.

Like `backtrack!`, but does not reset the `modcount`.
sourceraw docstring

end?clj/s

(end? source)

Returns true if source is at the end (drained).

Returns true if `source` is at the end (drained).
sourceraw docstring

indexclj/s

(index source)

Returns the current index in the source.

Returns the current index in the `source`.
sourceraw docstring

markclj/s

(mark source)

Marks the current source position, returning a mark object. The source can subsequently be reset to this mark. The caller is responsible to release the mark once it is no longer needed, preferrably using the with-resource macro.

Marks the current source position, returning a mark object.  The source
can subsequently be reset to this mark.  The caller is responsible to
release the mark once it is no longer needed, preferrably using the
[[with-resource]] macro.
sourceraw docstring

matches-str-ci?clj/s

(matches-str-ci? source s)

Like matches-str?, but case-insensitive.

Like `matches-str?`, but case-insensitive.
sourceraw docstring

matches-str?clj/s

(matches-str? source s)

Returns true if the next characters in source are equal to the ones in string s.

Returns true if the next characters in `source` are equal to the ones in
string `s`.
sourceraw docstring

modcountclj/s

(modcount source)

Returns an integer representing the number of times the source has been modified. This can be used to efficiently determine if the parser state has been modified.

Returns an integer representing the number of times the `source` has been
modified.  This can be used to efficiently determine if the parser state
has been modified.
sourceraw docstring

ofclj/s

(of input)
(of input opts)

Creates a source from input.

Creates a source from `input`.
sourceraw docstring

peekclj/s

(peek source)

Returns the next token in the source, without consuming it. Returns nil if the source is at the end.

Returns the next token in the `source`, without consuming it.
Returns `nil` if the source is at the end.
sourceraw docstring

peek-strclj/s

(peek-str source n)

Returns a string of up to n characters at the current source position, without consuming them.

Returns a string of up to `n` characters at the current source position,
without consuming them.
sourceraw docstring

pos-colclj/s

(pos-col pos)

Returns the column index of the position pos. The first column index is 0.

Returns the column index of the position `pos`.  The first column index is 0.
sourceraw docstring

pos-lineclj/s

(pos-line pos)

Returns the line index of the position pos. The first line index is 0.

Returns the line index of the position `pos`.  The first line index is 0.
sourceraw docstring

positionclj/s

(position source)
(position source index)

Returns the position (line and column indexes) of the source, at the current or a previous index.

Returns the position (line and column indexes) of the `source`, at
the current or a previous `index`.
sourceraw docstring

re-matchclj/s

(re-match source re)

Matches the regular expression re at the current source position and returns a platform-dependent match result object.

Matches the regular expression `re` at the current source position and
returns a platform-dependent match result object.
sourceraw docstring

read-char-when!clj/s

(read-char-when! source pred)

Reads and returns the next character when it satisfies pred. Returns false when it does not satsify pred, and nil at the end of the source.

Reads and returns the next character when it satisfies `pred`.  Returns
`false` when it does not satsify `pred`, and `nil` at the end of the
source.
sourceraw docstring

read-fromclj/s

(read-from source mark)

Returns a string of all characters from the marked position (inclusive) to the current position (exclusive).

Returns a string of all characters from the marked position (inclusive)
to the current position (exclusive).
sourceraw docstring

read-str!clj/s

(read-str! source n)

Returns a string of up to n characters and advances the source position. Returns the number of characters read.

Returns a string of up to `n` characters and advances the source position.
Returns the number of characters read.
sourceraw docstring

release!clj/s

(release! x)

Releases any resources held by x.

Releases any resources held by `x`.
sourceraw docstring

satisfies-char-pred?clj/s

(satisfies-char-pred? source pred)

Returns true if the next character in the source satisfies the char predicate pred.

Returns true if the next character in the `source` satisfies the char
predicate `pred`.
sourceraw docstring

skip!clj/s

(skip! source)
(skip! source n)

Skips the next token, or the next n tokens, and advances the source. Returns the number of tokens skipped.

Skips the next token, or the next `n` tokens, and advances the source.
Returns the number of tokens skipped.
sourceraw docstring

skip-chars-while!clj/s

(skip-chars-while! source pred)

Skips the next chars in source as long as they satisfy the char predicate pred. Returns the number of skipped characters.

Skips the next chars in `source` as long as they satisfy the char
predicate `pred`.  Returns the number of skipped characters.
sourceraw docstring

untracked-skip!clj/s

(untracked-skip! source)
(untracked-skip! source n)

Like skip!, but does not track line numbers. For optimisation, when we have already determined that the next character is not a line terminator.

Like `skip!`, but does not track line numbers.  For optimisation, when we
have already determined that the next character is not a line terminator.
sourceraw docstring

user-stateclj/s

(user-state source)

Returns the current user state.

Returns the current user state.
sourceraw docstring

with-resourceclj/smacro

(with-resource bindings & body)

Similar to with-open, but works in ClojureScript and SCI.

Similar to `with-open`, but works in ClojureScript and SCI.
sourceraw docstring

with-user-state!clj/s

(with-user-state! source state)

Sets the user state to state, and returns the source.

Sets the user state to `state`, and returns the `source`.
sourceraw docstring

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

× close