mirror of
https://github.com/danog/parser.git
synced 2024-12-02 09:27:50 +01:00
161 lines
3.9 KiB
Plaintext
161 lines
3.9 KiB
Plaintext
[
|
|
Function {
|
|
name: Identifier {
|
|
name: "foo",
|
|
},
|
|
params: [
|
|
Param {
|
|
name: Variable {
|
|
name: "a",
|
|
},
|
|
type: Some(
|
|
String,
|
|
),
|
|
variadic: false,
|
|
default: Some(
|
|
LiteralString {
|
|
value: "",
|
|
},
|
|
),
|
|
flags: [],
|
|
by_ref: false,
|
|
},
|
|
Param {
|
|
name: Variable {
|
|
name: "b",
|
|
},
|
|
type: Some(
|
|
Array,
|
|
),
|
|
variadic: false,
|
|
default: Some(
|
|
Array {
|
|
items: [],
|
|
},
|
|
),
|
|
flags: [],
|
|
by_ref: false,
|
|
},
|
|
],
|
|
body: [
|
|
Expression {
|
|
expr: Call {
|
|
target: Identifier {
|
|
name: "exit",
|
|
},
|
|
args: [
|
|
Arg {
|
|
name: None,
|
|
value: LiteralInteger {
|
|
i: 1,
|
|
},
|
|
unpack: false,
|
|
},
|
|
],
|
|
},
|
|
},
|
|
],
|
|
return_type: Some(
|
|
Never,
|
|
),
|
|
by_ref: false,
|
|
},
|
|
Function {
|
|
name: Identifier {
|
|
name: "bar",
|
|
},
|
|
params: [
|
|
Param {
|
|
name: Variable {
|
|
name: "a",
|
|
},
|
|
type: Some(
|
|
Integer,
|
|
),
|
|
variadic: false,
|
|
default: None,
|
|
flags: [],
|
|
by_ref: false,
|
|
},
|
|
Param {
|
|
name: Variable {
|
|
name: "b",
|
|
},
|
|
type: Some(
|
|
Float,
|
|
),
|
|
variadic: false,
|
|
default: None,
|
|
flags: [],
|
|
by_ref: false,
|
|
},
|
|
Param {
|
|
name: Variable {
|
|
name: "c",
|
|
},
|
|
type: Some(
|
|
String,
|
|
),
|
|
variadic: false,
|
|
default: None,
|
|
flags: [],
|
|
by_ref: false,
|
|
},
|
|
Param {
|
|
name: Variable {
|
|
name: "d",
|
|
},
|
|
type: Some(
|
|
True,
|
|
),
|
|
variadic: false,
|
|
default: None,
|
|
flags: [],
|
|
by_ref: false,
|
|
},
|
|
Param {
|
|
name: Variable {
|
|
name: "e",
|
|
},
|
|
type: Some(
|
|
False,
|
|
),
|
|
variadic: false,
|
|
default: None,
|
|
flags: [],
|
|
by_ref: false,
|
|
},
|
|
Param {
|
|
name: Variable {
|
|
name: "f",
|
|
},
|
|
type: Some(
|
|
Null,
|
|
),
|
|
variadic: false,
|
|
default: None,
|
|
flags: [],
|
|
by_ref: false,
|
|
},
|
|
],
|
|
body: [
|
|
Return {
|
|
value: Some(
|
|
Null,
|
|
),
|
|
},
|
|
],
|
|
return_type: Some(
|
|
Union(
|
|
[
|
|
Null,
|
|
String,
|
|
Integer,
|
|
Float,
|
|
],
|
|
),
|
|
),
|
|
by_ref: false,
|
|
},
|
|
]
|