Skip to content

Commit c60fc6a

Browse files
committed
Rust: Rename CallExpr to ParenArgsExpr
1 parent 70ab6a4 commit c60fc6a

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

rust/ast-generator/src/main.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ fn class_name(type_name: &str) -> String {
2222
"ArrayExpr" => "ArrayExprInternal".to_owned(),
2323
"AsmOptions" => "AsmOptionsList".to_owned(),
2424
"MacroStmts" => "MacroBlockExpr".to_owned(),
25+
"CallExpr" => "ParenArgsExpr".to_owned(),
2526
_ if type_name.starts_with("Record") => type_name.replacen("Record", "Struct", 1),
2627
_ if type_name.ends_with("Type") => format!("{type_name}Repr"),
2728
_ => type_name.to_owned(),
@@ -30,7 +31,7 @@ fn class_name(type_name: &str) -> String {
3031

3132
fn property_name(type_name: &str, field_name: &str) -> String {
3233
let name = match (type_name, field_name) {
33-
("CallExpr", "expr") => "function",
34+
("ParenArgsExpr", "expr") => "base",
3435
("LetExpr", "expr") => "scrutinee",
3536
("MatchExpr", "expr") => "scrutinee",
3637
("Variant", "expr") => "discriminant",

rust/schema/annotations.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,10 +228,10 @@ class _:
228228
loop_body: drop
229229

230230

231-
@annotate(CallExpr, cfg=True)
231+
@annotate(ParenArgsExpr, cfg=True)
232232
class _:
233233
"""
234-
A call expression. For example:
234+
An expression with parenthesized arguments. For example:
235235
```rust
236236
foo(42);
237237
foo::<u32, u64>(42);

0 commit comments

Comments
 (0)