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:
Tom Alexander
2023-10-29 17:29:16 -04:00
parent ba511b7f9e
commit f98a09bc59
62 changed files with 565 additions and 972 deletions

View File

@@ -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,
{