Trait SemanticsWithCustomSyntax

Source
pub trait SemanticsWithCustomSyntax: Semantics<BuiltinOperation: Clone, BuiltinQuery: Clone, NodeAbstract: Debug, EdgeAbstract: Debug> {
    type CS: CustomSyntax;

    // Required methods
    fn find_builtin_op(
        name: &str,
        args: Option<MacroArgs<'_>>,
    ) -> Option<Self::BuiltinOperation>;
    fn find_builtin_query(
        name: &str,
        args: Option<MacroArgs<'_>>,
    ) -> Option<Self::BuiltinQuery>;
    fn convert_node_type(
        syn_typ: <<Self as SemanticsWithCustomSyntax>::CS as CustomSyntax>::AbstractNodeType,
    ) -> Option<Self::NodeAbstract>;
    fn convert_edge_type(
        syn_typ: <<Self as SemanticsWithCustomSyntax>::CS as CustomSyntax>::AbstractEdgeType,
    ) -> Option<Self::EdgeAbstract>;
}

Required Associated Types§

Required Methods§

Source

fn find_builtin_op( name: &str, args: Option<MacroArgs<'_>>, ) -> Option<Self::BuiltinOperation>

Source

fn find_builtin_query( name: &str, args: Option<MacroArgs<'_>>, ) -> Option<Self::BuiltinQuery>

Source

fn convert_node_type( syn_typ: <<Self as SemanticsWithCustomSyntax>::CS as CustomSyntax>::AbstractNodeType, ) -> Option<Self::NodeAbstract>

Returns an option so a more general CustomSyntax can be reused for multiple semantics.

Source

fn convert_edge_type( syn_typ: <<Self as SemanticsWithCustomSyntax>::CS as CustomSyntax>::AbstractEdgeType, ) -> Option<Self::EdgeAbstract>

Returns an option so a more general CustomSyntax can be reused for multiple semantics.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl SemanticsWithCustomSyntax for ExampleSemantics

Source§

impl SemanticsWithCustomSyntax for ExampleWithRefSemantics

Implementors§