print.marker | R Documentation |
marker
An object of class marker
is an empty list created by the function
fail()
. To indicate that this object differs from simply list()
its
print method prints []
.
## S3 method for class 'marker'
print(x, ...)
x |
an object used to select a method. |
... |
further arguments passed to or from other methods. |
The marker
class is used internally to mark the largest index number of
the element (i.e. line) of the input character vector at which the parser
failed. This number is stored in the attribute n
of a marker and only
correctly corresponds to that index number if the parser is wrapped in a
reporter()
call.
The printed marker
object is returned invisibly.
failed()
d <- (literal("A") %then% literal("B"))(c("A","A"))
# prints the icon [] for failed parsing
d
# Reveal the modest content of the marker object
unclass(d)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.