pub struct Token {
pub idx: usize,
pub text: String,
pub kind: ModelicaToken,
pub start: Position,
pub end: Position,
}Expand description
Represents a single Modelica token.
Tokens contain information on their type and their coordinates in the source.
idx: position in the token collectiontext: text content of the tokenkind: token’s kindstart: position of the first characterend: position of the last character
Fields§
§idx: usizeIndex of the token in the input
text: StringText of the token
kind: ModelicaTokenToken’s kind
start: PositionPosition of staring character in the input
end: PositionPositon of ending character in the input
Trait Implementations§
source§impl PartialEq for Token
impl PartialEq for Token
impl StructuralPartialEq for Token
Auto Trait Implementations§
impl RefUnwindSafe for Token
impl Send for Token
impl Sync for Token
impl Unpin for Token
impl UnwindSafe for Token
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more