[−][src]Struct taplo::analytics::SyntaxInfo
Information about a position query only based on the syntax tree.
The information might also contain incomplete and invalid nodes, even if its syntax kind is valid.
Fields
range: Option<TextRange>
The range of the relevant area.
Note that this is not the range of the syntax token, but rather a helper for keys and values.
text: Option<String>
The text inside of relevant area.
element: Option<SyntaxElement>
The syntax element if any.
syntax_kinds: Vec<SyntaxKind>
The syntax kids relevant to the position
(e.g. SyntaxKind::KEY
and SyntaxKind::TABLE_HEADER
for inside table headers).
key_path: Option<Path>
The path of a single dotted key.
Implementations
impl SyntaxInfo
[src][−]
pub fn is_kind(&self, kind: SyntaxKind) -> bool
[src]
pub fn first_token_before(&self) -> Option<(TextRange, SyntaxToken)>
[src][−]
First non-whitespace (or newline) syntax token before the element.
Trait Implementations
impl Debug for SyntaxInfo
[src][+]
Auto Trait Implementations
impl !RefUnwindSafe for SyntaxInfo
impl !Send for SyntaxInfo
impl !Sync for SyntaxInfo
impl Unpin for SyntaxInfo
impl !UnwindSafe for SyntaxInfo
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src][+]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T> From<T> for T
[src][+]
impl<T, U> Into<U> for T where
U: From<T>,
[src][+]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src][+]
U: Into<T>,
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src][+]
U: TryFrom<T>,