Does some initialization work. This must be called before any other functions
of this module if you intend to use set_linestr. Returns an id that can be
used to disable the magic using teardown.
Disables magic registered using setup.
Returns the line the parser is currently working on, or undef if perl isnt
parsing anything right now.
Returns the position within the current line to which perl has already parsed
the input, or -1 if nothing is being parsed currently.
Sets the line the perl parser is currently working on to $string.
Note that perl wont notice any changes in the line string after the position
returned by get_linestr_offset.
Throws an exception when nothing is being compiled.
Convenience function to insert a piece of perl code into the current line
string (as returned by get_linestr) at the current offset (as returned by
Returns the string of additional stuff resulting from recent lexing that
is being held onto by the lexer. For example, the content of a quoted
string goes here. Returns undef if there is no such stuff.
Discard the string of additional stuff resulting from recent lexing that
is being held onto by the lexer.