Trait glsl_lang::ast::NodeContent

source ·
pub trait NodeContent:
    Sized
    + Debug
    + Clone
    + PartialEq {
    // Provided methods
    fn into_node<T>(self) -> Node<T>
       where T: From<Self> + NodeContent { ... }
    fn spanned(self, start: LexerPosition, end: LexerPosition) -> Node<Self> { ... }
}
Expand description

Trait for AST node contents.

All nodes which will be stored in a Node need to implement this.

Provided Methods§

source

fn into_node<T>(self) -> Node<T>
where T: From<Self> + NodeContent,

Convert the contents into a node

source

fn spanned(self, start: LexerPosition, end: LexerPosition) -> Node<Self>

Add span information to a syntax node

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl NodeContent for &'static str

Implementors§

source§

impl NodeContent for ArraySpecifierDimensionData

source§

impl NodeContent for AssignmentOpData

source§

impl NodeContent for BinaryOpData

source§

impl NodeContent for CaseLabelData

source§

impl NodeContent for CommentData

source§

impl NodeContent for ConditionData

source§

impl NodeContent for DeclarationData

source§

impl NodeContent for ExprData

source§

impl NodeContent for ExternalDeclarationData

source§

impl NodeContent for ForInitStatementData

source§

impl NodeContent for FunIdentifierData

source§

impl NodeContent for FunctionParameterDeclarationData

source§

impl NodeContent for InitializerData

source§

impl NodeContent for InterpolationQualifierData

source§

impl NodeContent for IterationStatementData

source§

impl NodeContent for JumpStatementData

source§

impl NodeContent for LayoutQualifierSpecData

source§

impl NodeContent for PathData

source§

impl NodeContent for PrecisionQualifierData

source§

impl NodeContent for PreprocessorData

source§

impl NodeContent for PreprocessorDefineData

source§

impl NodeContent for PreprocessorExtensionBehaviorData

source§

impl NodeContent for PreprocessorExtensionNameData

source§

impl NodeContent for PreprocessorVersionProfileData

source§

impl NodeContent for SelectionRestStatementData

source§

impl NodeContent for StatementData

source§

impl NodeContent for StorageQualifierData

source§

impl NodeContent for TypeQualifierSpecData

source§

impl NodeContent for TypeSpecifierNonArrayData

source§

impl NodeContent for UnaryOpData

source§

impl NodeContent for ArraySpecifierData

source§

impl NodeContent for ArrayedIdentifierData

source§

impl NodeContent for BlockData

source§

impl NodeContent for CompoundStatementData

source§

impl NodeContent for ExprStatementData

source§

impl NodeContent for ForRestStatementData

source§

impl NodeContent for FullySpecifiedTypeData

source§

impl NodeContent for FunctionDefinitionData

source§

impl NodeContent for FunctionParameterDeclaratorData

source§

impl NodeContent for FunctionPrototypeData

source§

impl NodeContent for IdentifierData

source§

impl NodeContent for InitDeclaratorListData

source§

impl NodeContent for LayoutQualifierData

source§

impl NodeContent for PreprocessorElseIfData

source§

impl NodeContent for PreprocessorErrorData

source§

impl NodeContent for PreprocessorExtensionData

source§

impl NodeContent for PreprocessorIfData

source§

impl NodeContent for PreprocessorIfDefData

source§

impl NodeContent for PreprocessorIfNDefData

source§

impl NodeContent for PreprocessorIncludeData

source§

impl NodeContent for PreprocessorLineData

source§

impl NodeContent for PreprocessorPragmaData

source§

impl NodeContent for PreprocessorUndefData

source§

impl NodeContent for PreprocessorVersionData

source§

impl NodeContent for SelectionStatementData

source§

impl NodeContent for SingleDeclarationData

source§

impl NodeContent for SingleDeclarationNoTypeData

source§

impl NodeContent for StructFieldSpecifierData

source§

impl NodeContent for StructSpecifierData

source§

impl NodeContent for SwitchStatementData

source§

impl NodeContent for TranslationUnit

source§

impl NodeContent for TypeNameData

source§

impl NodeContent for TypeQualifierData

source§

impl NodeContent for TypeSpecifierData