struct

TermBuf::Input::Sequence

Inherits Struct < Value < Object

One complete escape sequence, taken apart far enough to be matched against without every pattern having to parse it again.

bytes is what arrived, introducer and terminator included, because that is what an application handed a sequence it wants to interpret itself needs. body is everything after the introducer, terminator included, so that a pattern's head and tail are matched against the one string.

Constructors

new(bytes : Bytes, prefix : Prefix, body : String, final : Char | Nil)
Source
parse(bytes : Bytes) : Sequence

Takes bytes apart. Anything that does not begin with an escape and an introducer is Prefix::Other, since nothing else can be said about it.

Source

Instance methods

body
bytes
clone
Source
copy_with(bytes _bytes = @bytes, prefix _prefix = @prefix, body _body = @body, final _final = @final)
Source
final
prefix