Trait Spanned

Source
pub trait Spanned {
    // Required methods
    fn span(&self) -> Span;
    fn source_file(&self) -> Option<&SourceFile>;

    // Provided method
    fn to_source_location(&self) -> SourceLocation { ... }
}
Expand description

Returns a span. This is implemented for tokens and nodes

Required Methods§

Provided Methods§

Implementations on Foreign Types§

Source§

impl Spanned for Option<NodeOrToken>

Source§

impl Spanned for Option<SyntaxNode>

Source§

impl Spanned for Option<SyntaxToken>

Source§

impl Spanned for Option<SourceLocation>

Implementors§

Source§

impl Spanned for NodeOrToken

Source§

impl Spanned for sixtyfps_compilerlib::expression_tree::BindingExpression

Source§

impl Spanned for sixtyfps_compilerlib::object_tree::Element

Source§

impl Spanned for SyntaxNode

Source§

impl Spanned for SyntaxToken

Source§

impl Spanned for Array

Source§

impl Spanned for ArrayType

Source§

impl Spanned for AtImageUrl

Source§

impl Spanned for AtLinearGradient

Source§

impl Spanned for BinaryExpression

Source§

impl Spanned for Binding

Source§

impl Spanned for sixtyfps_compilerlib::parser::syntax_nodes::BindingExpression

Source§

impl Spanned for CallbackConnection

Source§

impl Spanned for CallbackDeclaration

Source§

impl Spanned for ChildrenPlaceholder

Source§

impl Spanned for CodeBlock

Source§

impl Spanned for Component

Source§

impl Spanned for ConditionalElement

Source§

impl Spanned for ConditionalExpression

Source§

impl Spanned for DeclaredIdentifier

Source§

impl Spanned for Document

Source§

impl Spanned for sixtyfps_compilerlib::parser::syntax_nodes::Element

Source§

impl Spanned for ExportIdentifier

Source§

impl Spanned for ExportName

Source§

impl Spanned for ExportSpecifier

Source§

impl Spanned for ExportsList

Source§

impl Spanned for Expression

Source§

impl Spanned for ExternalName

Source§

impl Spanned for FunctionCallExpression

Source§

impl Spanned for ImportIdentifier

Source§

impl Spanned for ImportIdentifierList

Source§

impl Spanned for ImportSpecifier

Source§

impl Spanned for IndexExpression

Source§

impl Spanned for InternalName

Source§

impl Spanned for MemberAccess

Source§

impl Spanned for ObjectLiteral

Source§

impl Spanned for ObjectMember

Source§

impl Spanned for ObjectType

Source§

impl Spanned for ObjectTypeMember

Source§

impl Spanned for PropertyAnimation

Source§

impl Spanned for PropertyDeclaration

Source§

impl Spanned for QualifiedName

Source§

impl Spanned for RepeatedElement

Source§

impl Spanned for RepeatedIndex

Source§

impl Spanned for ReturnStatement

Source§

impl Spanned for ReturnType

Source§

impl Spanned for SelfAssignment

Source§

impl Spanned for State

Source§

impl Spanned for StatePropertyChange

Source§

impl Spanned for States

Source§

impl Spanned for StringTemplate

Source§

impl Spanned for StructDeclaration

Source§

impl Spanned for SubElement

Source§

impl Spanned for Transition

Source§

impl Spanned for Transitions

Source§

impl Spanned for TwoWayBinding

Source§

impl Spanned for Type

Source§

impl Spanned for UnaryOpExpression

Source§

impl Spanned for SourceLocation