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

342 lines
11 KiB
Plaintext

[
Class(
Class {
start: (
3,
1,
),
end: (
7,
1,
),
name: Identifier {
start: (
3,
7,
),
name: "Foo2",
end: (
3,
12,
),
},
extends: None,
implements: None,
attributes: [],
members: [
TraitUsage(
TraitUsage {
traits: [
Identifier {
start: (
4,
9,
),
name: "B",
end: (
4,
11,
),
},
],
adaptations: [
Alias {
trait: None,
method: Identifier {
start: (
5,
9,
),
name: "foo",
end: (
5,
13,
),
},
alias: Identifier {
start: (
5,
26,
),
name: "bar",
end: (
5,
29,
),
},
visibility: Some(
Protected {
start: (
5,
16,
),
end: (
5,
26,
),
},
),
},
],
},
),
],
},
),
Class(
Class {
start: (
9,
1,
),
end: (
14,
1,
),
name: Identifier {
start: (
9,
7,
),
name: "Bar2",
end: (
9,
12,
),
},
extends: None,
implements: None,
attributes: [],
members: [
TraitUsage(
TraitUsage {
traits: [
Identifier {
start: (
10,
9,
),
name: "B",
end: (
10,
10,
),
},
Identifier {
start: (
11,
9,
),
name: "C",
end: (
11,
11,
),
},
],
adaptations: [
Precedence {
trait: Some(
Identifier {
start: (
12,
13,
),
name: "B",
end: (
12,
14,
),
},
),
method: Identifier {
start: (
12,
16,
),
name: "foo",
end: (
12,
20,
),
},
insteadof: [
Identifier {
start: (
12,
30,
),
name: "C",
end: (
12,
31,
),
},
],
},
],
},
),
],
},
),
Class(
Class {
start: (
16,
1,
),
end: (
18,
1,
),
name: Identifier {
start: (
16,
7,
),
name: "Bar3",
end: (
16,
12,
),
},
extends: None,
implements: None,
attributes: [],
members: [
TraitUsage(
TraitUsage {
traits: [
Identifier {
start: (
17,
9,
),
name: "B",
end: (
17,
11,
),
},
],
adaptations: [
Alias {
trait: Some(
Identifier {
start: (
17,
13,
),
name: "B",
end: (
17,
14,
),
},
),
method: Identifier {
start: (
17,
16,
),
name: "foo",
end: (
17,
20,
),
},
alias: Identifier {
start: (
17,
23,
),
name: "bar",
end: (
17,
26,
),
},
visibility: None,
},
],
},
),
],
},
),
Class(
Class {
start: (
20,
1,
),
end: (
22,
1,
),
name: Identifier {
start: (
20,
7,
),
name: "Bar4",
end: (
20,
12,
),
},
extends: None,
implements: None,
attributes: [],
members: [
TraitUsage(
TraitUsage {
traits: [
Identifier {
start: (
21,
9,
),
name: "B",
end: (
21,
11,
),
},
],
adaptations: [
Alias {
trait: None,
method: Identifier {
start: (
21,
13,
),
name: "foo",
end: (
21,
17,
),
},
alias: Identifier {
start: (
21,
20,
),
name: "bar",
end: (
21,
23,
),
},
visibility: None,
},
],
},
),
],
},
),
]