Skip to content

Commit 1aab487

Browse files
committed
refactor(ast): rename function target to callee.
1 parent 9ae541d commit 1aab487

File tree

6 files changed

+8
-8
lines changed

6 files changed

+8
-8
lines changed

crates/fuse-ast/src/ast.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@ pub struct ParenthesizedExpression {
392392
#[derive(Debug, PartialEq)]
393393
pub struct CallExpression {
394394
pub span: Span,
395-
pub target: Expression,
395+
pub callee: Expression,
396396
pub arguments: Vec<Expression>,
397397
}
398398

crates/fuse-ast/src/ast_factory.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -172,12 +172,12 @@ impl AstFactory {
172172
pub fn call_expression(
173173
&self,
174174
span: Span,
175-
target: Expression,
175+
callee: Expression,
176176
arguments: Vec<Expression>,
177177
) -> Expression {
178178
Expression::CallExpression(Box::from(CallExpression {
179179
span,
180-
target,
180+
callee,
181181
arguments,
182182
}))
183183
}

crates/fuse-ast/src/visit.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ pub fn walk_construction_field<'ast, V: Visitor<'ast>>(
348348
}
349349

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

crates/fuse-parser/tests/cases/pass/call-expression-01/ast.snap

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Some(Chunk(
1616
start: 4,
1717
end: 6,
1818
),
19-
target: Identifier(Identifier(
19+
callee: Identifier(Identifier(
2020
span: Span(
2121
start: 0,
2222
end: 4,

crates/fuse-parser/tests/cases/pass/call-expression-02/ast.snap

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Some(Chunk(
1616
start: 4,
1717
end: 13,
1818
),
19-
target: Identifier(Identifier(
19+
callee: Identifier(Identifier(
2020
span: Span(
2121
start: 0,
2222
end: 4,

crates/fuse-parser/tests/cases/pass/call-expression-03/ast.snap

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Some(Chunk(
3333
start: 7,
3434
end: 9,
3535
),
36-
target: Identifier(Identifier(
36+
callee: Identifier(Identifier(
3737
span: Span(
3838
start: 4,
3939
end: 7,
@@ -47,7 +47,7 @@ Some(Chunk(
4747
start: 13,
4848
end: 15,
4949
),
50-
target: Identifier(Identifier(
50+
callee: Identifier(Identifier(
5151
span: Span(
5252
start: 10,
5353
end: 13,

0 commit comments

Comments
 (0)