parser/tests/0221/ast.txt
Saif Eddin Gmati b6c145f98e
fix: attributes support (#155)
Signed-off-by: azjezz <azjezz@protonmail.com>
2022-12-04 16:12:23 +01:00

132 lines
3.6 KiB
Plaintext

[
Interface {
name: Identifier {
name: "A",
},
attributes: [],
extends: [],
body: [],
},
Interface {
name: Identifier {
name: "B",
},
attributes: [],
extends: [],
body: [],
},
Interface {
name: Identifier {
name: "C",
},
attributes: [],
extends: [],
body: [],
},
Interface {
name: Identifier {
name: "D",
},
attributes: [],
extends: [],
body: [],
},
Function {
name: Identifier {
name: "foo",
},
attributes: [],
params: [
Param {
name: Variable {
name: "a",
},
attributes: [],
type: Some(
Union(
[
Identifier(
Identifier {
name: "A",
},
),
Intersection(
[
Identifier(
Identifier {
name: "B",
},
),
Identifier(
Identifier {
name: "C",
},
),
Identifier(
Identifier {
name: "D",
},
),
],
),
],
),
),
variadic: false,
default: None,
flags: [],
by_ref: false,
},
],
body: [
Expression {
expr: Call {
target: Identifier {
name: "exit",
},
args: [
Arg {
name: None,
value: LiteralInteger {
i: 0,
},
unpack: false,
},
],
},
},
],
return_type: Some(
Intersection(
[
Identifier(
Identifier {
name: "A",
},
),
Union(
[
Identifier(
Identifier {
name: "B",
},
),
Identifier(
Identifier {
name: "C",
},
),
Identifier(
Identifier {
name: "D",
},
),
],
),
],
),
),
by_ref: false,
},
]