parser/tests/0019/ast.txt

489 lines
16 KiB
Plaintext
Raw Normal View History

[
2022-12-01 13:55:04 +01:00
BracedNamespace {
name: None,
body: [
Function {
name: Identifier {
name: "globalFunc",
},
attributes: [],
params: [],
body: [],
return_type: None,
by_ref: false,
},
],
},
2022-12-01 13:55:04 +01:00
BracedNamespace {
name: Some(
"foo",
),
body: [
Expression {
expr: Infix {
lhs: Variable {
name: "a",
},
op: Assign,
rhs: Closure {
params: [],
attributes: [],
uses: [],
return_type: None,
body: [],
static: false,
by_ref: false,
},
},
},
Expression {
expr: Infix {
lhs: Variable {
name: "b",
},
op: Assign,
rhs: Closure {
params: [
Param {
name: Variable {
name: "b",
},
attributes: [],
type: None,
variadic: false,
default: None,
flags: [],
by_ref: true,
},
],
attributes: [],
uses: [],
return_type: None,
body: [],
static: false,
by_ref: false,
},
},
},
Expression {
expr: Infix {
lhs: Variable {
name: "c",
},
op: Assign,
rhs: Closure {
params: [],
attributes: [],
uses: [],
return_type: None,
body: [],
static: false,
by_ref: true,
},
},
},
Expression {
expr: Infix {
lhs: Variable {
name: "d",
},
op: Assign,
rhs: Closure {
params: [
Param {
name: Variable {
name: "b",
},
attributes: [],
type: None,
variadic: false,
default: None,
flags: [],
by_ref: true,
},
],
attributes: [],
uses: [],
return_type: None,
body: [
Return {
value: Some(
Variable {
name: "b",
},
),
},
],
static: false,
by_ref: true,
},
},
},
Expression {
expr: Infix {
lhs: Variable {
name: "e",
},
op: Assign,
rhs: ArrowFunction {
params: [],
attributes: [],
return_type: None,
expr: Null,
by_ref: false,
static: false,
},
},
},
Expression {
expr: Infix {
lhs: Variable {
name: "f",
},
op: Assign,
rhs: ArrowFunction {
params: [
Param {
name: Variable {
name: "b",
},
attributes: [],
type: None,
variadic: false,
default: None,
flags: [],
by_ref: true,
},
],
attributes: [],
return_type: None,
expr: Null,
by_ref: false,
static: false,
},
},
},
Expression {
expr: Infix {
lhs: Variable {
name: "g",
},
op: Assign,
rhs: ArrowFunction {
params: [],
attributes: [],
return_type: None,
expr: Null,
by_ref: true,
static: false,
},
},
},
Expression {
expr: Infix {
lhs: Variable {
name: "h",
},
op: Assign,
rhs: ArrowFunction {
params: [
Param {
name: Variable {
name: "b",
},
attributes: [],
type: None,
variadic: false,
default: None,
flags: [],
by_ref: true,
},
],
attributes: [],
return_type: None,
expr: Variable {
name: "b",
},
by_ref: true,
static: false,
},
},
},
],
},
2022-12-01 13:55:04 +01:00
BracedNamespace {
name: Some(
"bar",
),
body: [
Expression {
expr: Infix {
lhs: Variable {
name: "a",
},
op: Assign,
rhs: Closure {
params: [],
attributes: [],
uses: [],
return_type: None,
body: [],
static: true,
by_ref: false,
},
},
},
Expression {
expr: Infix {
lhs: Variable {
name: "b",
},
op: Assign,
rhs: Closure {
params: [
Param {
name: Variable {
name: "b",
},
attributes: [],
type: None,
variadic: false,
default: None,
flags: [],
by_ref: true,
},
],
attributes: [],
uses: [],
return_type: None,
body: [],
static: true,
by_ref: false,
},
},
},
Expression {
expr: Infix {
lhs: Variable {
name: "c",
},
op: Assign,
rhs: Closure {
params: [],
attributes: [],
uses: [],
return_type: None,
body: [],
static: true,
by_ref: true,
},
},
},
Expression {
expr: Infix {
lhs: Variable {
name: "d",
},
op: Assign,
rhs: Closure {
params: [
Param {
name: Variable {
name: "b",
},
attributes: [],
type: None,
variadic: false,
default: None,
flags: [],
by_ref: true,
},
],
attributes: [],
uses: [],
return_type: None,
body: [
Return {
value: Some(
Variable {
name: "b",
},
),
},
],
static: true,
by_ref: true,
},
},
},
Expression {
expr: Infix {
lhs: Variable {
name: "e",
},
op: Assign,
rhs: ArrowFunction {
params: [],
attributes: [],
return_type: None,
expr: Null,
by_ref: false,
static: true,
},
},
},
Expression {
expr: Infix {
lhs: Variable {
name: "f",
},
op: Assign,
rhs: ArrowFunction {
params: [
Param {
name: Variable {
name: "b",
},
attributes: [],
type: None,
variadic: false,
default: None,
flags: [],
by_ref: true,
},
],
attributes: [],
return_type: None,
expr: Null,
by_ref: false,
static: true,
},
},
},
Expression {
expr: Infix {
lhs: Variable {
name: "g",
},
op: Assign,
rhs: ArrowFunction {
params: [],
attributes: [],
return_type: None,
expr: Null,
by_ref: true,
static: true,
},
},
},
Expression {
expr: Infix {
lhs: Variable {
name: "h",
},
op: Assign,
rhs: ArrowFunction {
params: [
Param {
name: Variable {
name: "b",
},
attributes: [],
type: None,
variadic: false,
default: None,
flags: [],
by_ref: true,
},
],
attributes: [],
return_type: None,
expr: Variable {
name: "b",
},
by_ref: true,
static: true,
},
},
},
],
},
2022-12-01 13:55:04 +01:00
BracedNamespace {
name: Some(
"baz",
),
body: [
Function {
name: Identifier {
name: "a",
},
attributes: [],
params: [
Param {
name: Variable {
name: "b",
},
attributes: [],
type: None,
variadic: false,
default: None,
flags: [],
by_ref: true,
},
],
body: [],
return_type: None,
by_ref: false,
},
Function {
name: Identifier {
name: "b",
},
attributes: [],
params: [
Param {
name: Variable {
name: "b",
},
attributes: [],
type: None,
variadic: false,
default: None,
flags: [],
by_ref: false,
},
],
body: [
Return {
value: Some(
Variable {
name: "b",
},
),
},
],
return_type: None,
by_ref: true,
},
Function {
name: Identifier {
name: "c",
},
attributes: [],
params: [],
body: [
Return {
value: Some(
Variable {
name: "b",
},
),
},
],
return_type: None,
by_ref: true,
},
],
},
]