parser/tests/fixtures/0153/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

163 lines
6.6 KiB
Plaintext

[
Namespace {
name: Identifier {
start: (
3,
11,
),
name: "Foo\Bar",
end: (
3,
18,
),
},
body: [
Noop(
(
3,
18,
),
),
Class(
Class {
start: (
5,
7,
),
end: (
9,
1,
),
name: Identifier {
start: (
5,
13,
),
name: "Baz",
end: (
5,
17,
),
},
extends: None,
implements: None,
attributes: [],
members: [
Method(
Method {
start: (
6,
13,
),
end: (
8,
9,
),
name: Identifier {
start: (
6,
22,
),
name: "__construct",
end: (
6,
33,
),
},
attributes: [],
parameters: MethodParameterList {
start: (
6,
33,
),
end: (
8,
8,
),
members: [
MethodParameter {
start: (
7,
11,
),
end: (
7,
47,
),
name: Variable {
start: (
7,
34,
),
name: "name",
end: (
7,
40,
),
},
attributes: [],
type: Some(
String,
),
variadic: false,
default: Some(
LiteralString {
value: "foo",
},
),
modifiers: PromotedPropertyModifierGroup {
modifiers: [
Public {
start: (
7,
11,
),
end: (
7,
18,
),
},
Readonly {
start: (
7,
18,
),
end: (
7,
27,
),
},
],
},
by_ref: false,
},
],
},
body: Some(
[],
),
modifiers: MethodModifierGroup {
modifiers: [
Public {
start: (
6,
6,
),
end: (
6,
13,
),
},
],
},
return_type: None,
by_ref: false,
},
),
],
},
),
],
},
]