1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
---
source: tests/parser.rs
description: "\n get http://localhost {\n header \"Authorization\" \"Bearer token\"\n header \"random\" \"tokener Bear\"\n }"
expression: ast
---
Program(
source: "\n get http://localhost {\n header \"Authorization\" \"Bearer token\"\n header \"random\" \"tokener Bear\"\n }",
items: [
Request(Request(
method: GET,
endpoint: Url(Literal(
value: "http://localhost",
span: Span(
start: Position(
value: 13,
line: 1,
col: 12,
),
end: Position(
value: 28,
line: 1,
col: 27,
),
),
)),
block: Some(Block(
statements: [
Header(
name: Ok(StringLiteral(
raw: "\"Authorization\"",
value: "Authorization",
span: Span(
start: Position(
value: 47,
line: 2,
col: 15,
),
end: Position(
value: 61,
line: 2,
col: 29,
),
),
)),
value: String(StringLiteral(
raw: "\"Bearer token\"",
value: "Bearer token",
span: Span(
start: Position(
value: 63,
line: 2,
col: 31,
),
end: Position(
value: 76,
line: 2,
col: 44,
),
),
)),
),
Header(
name: Ok(StringLiteral(
raw: "\"random\"",
value: "random",
span: Span(
start: Position(
value: 93,
line: 3,
col: 15,
),
end: Position(
value: 100,
line: 3,
col: 22,
),
),
)),
value: String(StringLiteral(
raw: "\"tokener Bear\"",
value: "tokener Bear",
span: Span(
start: Position(
value: 102,
line: 3,
col: 24,
),
end: Position(
value: 115,
line: 3,
col: 37,
),
),
)),
),
],
span: Span(
start: Position(
value: 30,
line: 1,
col: 29,
),
end: Position(
value: 125,
line: 4,
col: 8,
),
),
)),
span: Span(
start: Position(
value: 9,
line: 1,
col: 8,
),
end: Position(
value: 125,
line: 4,
col: 8,
),
),
)),
],
)