parser/tests/fixtures/0216/ast.txt
Saif Eddin Gmati c93634a62b
chore: refactor class and trait ast (#189)
Signed-off-by: azjezz <azjezz@protonmail.com>

Signed-off-by: azjezz <azjezz@protonmail.com>
2022-12-09 22:05:03 +01:00

114 lines
3.9 KiB
Plaintext

[
Class(
Class {
start: (
3,
1,
),
end: (
7,
1,
),
name: Identifier {
start: (
3,
7,
),
name: "foo",
end: (
3,
11,
),
},
extends: None,
implements: None,
attributes: [],
members: [
Method(
Method {
start: (
4,
12,
),
end: (
6,
5,
),
name: Identifier {
start: (
4,
21,
),
name: "bar",
end: (
4,
24,
),
},
attributes: [],
parameters: MethodParameterList {
start: (
4,
24,
),
end: (
4,
26,
),
members: [],
},
body: Some(
[
Expression {
expr: Call {
target: Identifier(
Identifier {
start: (
5,
9,
),
name: "exit",
end: (
5,
13,
),
},
),
args: [
Arg {
name: None,
value: LiteralInteger {
i: "1",
},
unpack: false,
},
],
},
},
],
),
modifiers: MethodModifierGroup {
modifiers: [
Public {
start: (
4,
5,
),
end: (
4,
12,
),
},
],
},
return_type: Some(
ParentReference,
),
by_ref: false,
},
),
],
},
),
]