pub trait TokenStream {
// Required methods
fn get_start_offset(&self) -> Option<TextOffset>;
fn as_str(&self) -> &str;
}
Expand description
Used to run Cairo language parser over a custom source of tokens not produced by the lexer.
Required Methods§
Sourcefn get_start_offset(&self) -> Option<TextOffset>
fn get_start_offset(&self) -> Option<TextOffset>
Returns the starting TextOffset
of the token stream, if there is at least a single
token.
This property is used as offset of a root cairo_lang_syntax::node::SyntaxNode produced when parsing this stream.