Use macros for creating the intermediate stage.
This is to make it easier to change function signatures by consolidating the places where the signatures exist.
This commit is contained in:
@@ -113,19 +113,19 @@ pub(crate) enum IAstNode {
|
||||
}
|
||||
|
||||
pub(crate) trait IntoIAstNode {
|
||||
fn into_ast_node<'parse, 'b>(
|
||||
&'b self,
|
||||
registry: &'b mut Registry<'parse>,
|
||||
) -> BoxFuture<'b, Result<IAstNode, CustomError>>
|
||||
fn into_ast_node<'reg, 'orig, 'parse, 'inp: 'reg + 'orig>(
|
||||
&'orig self,
|
||||
registry: &'reg mut Registry<'orig, 'parse>,
|
||||
) -> BoxFuture<'inp, Result<IAstNode, CustomError>>
|
||||
where
|
||||
Self: 'parse;
|
||||
}
|
||||
|
||||
impl IntoIAstNode for organic::types::DocumentElement<'_> {
|
||||
fn into_ast_node<'parse, 'b>(
|
||||
&'b self,
|
||||
registry: &'b mut Registry<'parse>,
|
||||
) -> BoxFuture<'b, Result<IAstNode, CustomError>>
|
||||
fn into_ast_node<'reg, 'orig, 'parse, 'inp: 'reg + 'orig>(
|
||||
&'orig self,
|
||||
registry: &'reg mut Registry<'orig, 'parse>,
|
||||
) -> BoxFuture<'inp, Result<IAstNode, CustomError>>
|
||||
where
|
||||
Self: 'parse,
|
||||
{
|
||||
@@ -144,10 +144,10 @@ impl IntoIAstNode for organic::types::DocumentElement<'_> {
|
||||
}
|
||||
|
||||
impl IntoIAstNode for organic::types::Element<'_> {
|
||||
fn into_ast_node<'parse, 'b>(
|
||||
&'b self,
|
||||
registry: &'b mut Registry<'parse>,
|
||||
) -> BoxFuture<'b, Result<IAstNode, CustomError>>
|
||||
fn into_ast_node<'reg, 'orig, 'parse, 'inp: 'reg + 'orig>(
|
||||
&'orig self,
|
||||
registry: &'reg mut Registry<'orig, 'parse>,
|
||||
) -> BoxFuture<'inp, Result<IAstNode, CustomError>>
|
||||
where
|
||||
Self: 'parse,
|
||||
{
|
||||
@@ -232,10 +232,10 @@ impl IntoIAstNode for organic::types::Element<'_> {
|
||||
}
|
||||
|
||||
impl IntoIAstNode for organic::types::Object<'_> {
|
||||
fn into_ast_node<'parse, 'b>(
|
||||
&'b self,
|
||||
registry: &'b mut Registry<'parse>,
|
||||
) -> BoxFuture<'b, Result<IAstNode, CustomError>>
|
||||
fn into_ast_node<'reg, 'orig, 'parse, 'inp: 'reg + 'orig>(
|
||||
&'orig self,
|
||||
registry: &'reg mut Registry<'orig, 'parse>,
|
||||
) -> BoxFuture<'inp, Result<IAstNode, CustomError>>
|
||||
where
|
||||
Self: 'parse,
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user