Skip to content

Commit

Permalink
refactor(ast): rename function target to callee.
Browse files Browse the repository at this point in the history
  • Loading branch information
rzvxa committed Mar 10, 2024
1 parent 9ae541d commit 1aab487
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion crates/fuse-ast/src/ast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ pub struct ParenthesizedExpression {
#[derive(Debug, PartialEq)]
pub struct CallExpression {
pub span: Span,
pub target: Expression,
pub callee: Expression,
pub arguments: Vec<Expression>,
}

Expand Down
4 changes: 2 additions & 2 deletions crates/fuse-ast/src/ast_factory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -172,12 +172,12 @@ impl AstFactory {
pub fn call_expression(
&self,
span: Span,
target: Expression,
callee: Expression,
arguments: Vec<Expression>,
) -> Expression {
Expression::CallExpression(Box::from(CallExpression {
span,
target,
callee,
arguments,
}))
}
Expand Down
2 changes: 1 addition & 1 deletion crates/fuse-ast/src/visit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ pub fn walk_construction_field<'ast, V: Visitor<'ast>>(
}

pub fn walk_call_expression<'ast, V: Visitor<'ast>>(visitor: &mut V, call: &'ast CallExpression) {
visit!(visitor.visit_expression(&call.target));
visit!(visitor.visit_expression(&call.callee));
visit_list!(visitor.visit_expression(&call.arguments));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Some(Chunk(
start: 4,
end: 6,
),
target: Identifier(Identifier(
callee: Identifier(Identifier(
span: Span(
start: 0,
end: 4,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Some(Chunk(
start: 4,
end: 13,
),
target: Identifier(Identifier(
callee: Identifier(Identifier(
span: Span(
start: 0,
end: 4,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Some(Chunk(
start: 7,
end: 9,
),
target: Identifier(Identifier(
callee: Identifier(Identifier(
span: Span(
start: 4,
end: 7,
Expand All @@ -47,7 +47,7 @@ Some(Chunk(
start: 13,
end: 15,
),
target: Identifier(Identifier(
callee: Identifier(Identifier(
span: Span(
start: 10,
end: 13,
Expand Down

0 comments on commit 1aab487

Please sign in to comment.