Trait lib_ruby_parser::source::SourceLineTrait[][src]

pub trait SourceLineTrait: Debug + Clone + Default + PartialEq + Eq {
    fn new(start: usize, end: usize, ends_with_eof: bool) -> Self
    where
        Self: Sized
;
fn start(&self) -> usize;
fn set_start(&mut self, start: usize);
fn end(&self) -> usize;
fn set_end(&mut self, end: usize);
fn ends_with_eof(&self) -> bool;
fn set_ends_with_eof(&mut self, ends_with_eof: bool); fn len(&self) -> usize { ... }
fn line_end(&self) -> usize { ... } }
Expand description

Trait with common methods of SourceLine (Rust- or external-based)

Required methods

Constructs a SourceLine

Returns start of the line

Sets start of the line

Returns end of the line

Sets end of the line

Returns true of line ends with EOF

Sets whether line ends with EOF

Provided methods

Returns length of the line

Returns location of the last non-EOF, non-EOL character

Implementors