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§
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>
Sourcefn convert_node_type(
syn_typ: <<Self as SemanticsWithCustomSyntax>::CS as CustomSyntax>::AbstractNodeType,
) -> Option<Self::NodeAbstract>
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.
Sourcefn convert_edge_type(
syn_typ: <<Self as SemanticsWithCustomSyntax>::CS as CustomSyntax>::AbstractEdgeType,
) -> Option<Self::EdgeAbstract>
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.