--- source: tests/parser.rs description: "\nset BASE_URL \"httas...\"\npost http://lasdf.. {}\n// asdfasdf\n\nlet output_file = \"output/file.json\"\nlet token = env(\"auth-token\")\n\n@log(output_file)\npost /asd {\n // asdfasd\n header \"Authorization\" token\n body `{\n \"neet\": \"${env(\"var\")}\",\n \"nerd\": \"${output_file}\",\n }`\n}\n\n@skip\nget /api {}\n\nput /api {}\npatch /api {}\ndelete /api {}\n" expression: ast --- Program( source: "\nset BASE_URL \"httas...\"\npost http://lasdf.. {}\n// asdfasdf\n\nlet output_file = \"output/file.json\"\nlet token = env(\"auth-token\")\n\n@log(output_file)\npost /asd {\n // asdfasd\n header \"Authorization\" token\n body `{\n \"neet\": \"${env(\"var\")}\",\n \"nerd\": \"${output_file}\",\n }`\n}\n\n@skip\nget /api {}\n\nput /api {}\npatch /api {}\ndelete /api {}\n", items: [ Set(ConstantDeclaration( identifier: Ok(Token( kind: Ident, text: "BASE_URL", start: Position( value: 5, line: 1, col: 4, ), )), value: String(StringLiteral( raw: "\"httas...\"", value: "httas...", span: Span( start: Position( value: 14, line: 1, col: 13, ), end: Position( value: 23, line: 1, col: 22, ), ), )), )), Request(Request( method: POST, endpoint: Url(Literal( value: "http://lasdf..", span: Span( start: Position( value: 30, line: 2, col: 5, ), end: Position( value: 43, line: 2, col: 18, ), ), )), block: Some(Block( statements: [], span: Span( start: Position( value: 45, line: 2, col: 20, ), end: Position( value: 46, line: 2, col: 21, ), ), )), span: Span( start: Position( value: 25, line: 2, col: 0, ), end: Position( value: 46, line: 2, col: 21, ), ), )), LineComment(Literal( value: "// asdfasdf", span: Span( start: Position( value: 48, line: 3, col: 0, ), end: Position( value: 58, line: 3, col: 10, ), ), )), Let(VariableDeclaration( identifier: Ok(Token( kind: Ident, text: "output_file", start: Position( value: 65, line: 5, col: 4, ), )), value: String(StringLiteral( raw: "\"output/file.json\"", value: "output/file.json", span: Span( start: Position( value: 79, line: 5, col: 18, ), end: Position( value: 96, line: 5, col: 35, ), ), )), )), Let(VariableDeclaration( identifier: Ok(Token( kind: Ident, text: "token", start: Position( value: 102, line: 6, col: 4, ), )), value: Call(CallExpr( identifier: Ok(Token( kind: Ident, text: "env", start: Position( value: 110, line: 6, col: 12, ), )), arguments: ExpressionList( span: Span( start: Position( value: 113, line: 6, col: 15, ), end: Position( value: 126, line: 6, col: 28, ), ), items: [ This(String(StringLiteral( raw: "\"auth-token\"", value: "auth-token", span: Span( start: Position( value: 114, line: 6, col: 16, ), end: Position( value: 125, line: 6, col: 27, ), ), ))), ], ), )), )), Attribute(Attribute( location: Position( value: 129, line: 8, col: 0, ), identifier: Ok(Token( kind: Ident, text: "log", start: Position( value: 130, line: 8, col: 1, ), )), arguments: Some(ExpressionList( span: Span( start: Position( value: 133, line: 8, col: 4, ), end: Position( value: 145, line: 8, col: 16, ), ), items: [ This(Identifier(Ok(Token( kind: Ident, text: "output_file", start: Position( value: 134, line: 8, col: 5, ), )))), ], )), )), Request(Request( method: POST, endpoint: Pathname(Literal( value: "/asd", span: Span( start: Position( value: 152, line: 9, col: 5, ), end: Position( value: 155, line: 9, col: 8, ), ), )), block: Some(Block( statements: [ LineComment(Literal( value: "// asdfasd", span: Span( start: Position( value: 161, line: 10, col: 2, ), end: Position( value: 170, line: 10, col: 11, ), ), )), Header( name: Ok(StringLiteral( raw: "\"Authorization\"", value: "Authorization", span: Span( start: Position( value: 181, line: 11, col: 9, ), end: Position( value: 195, line: 11, col: 23, ), ), )), value: Identifier(Ok(Token( kind: Ident, text: "token", start: Position( value: 197, line: 11, col: 25, ), ))), ), Body( value: TemplateStringLiteral( span: Span( start: Position( value: 210, line: 12, col: 7, ), end: Position( value: 279, line: 15, col: 3, ), ), parts: [ StringPart(StringLiteral( raw: "{\n \"neet\": \"", value: "{\n \"neet\": \"", span: Span( start: Position( value: 211, line: 12, col: 8, ), end: Position( value: 227, line: 12, col: 24, ), ), )), ExpressionPart(Call(CallExpr( identifier: Ok(Token( kind: Ident, text: "env", start: Position( value: 230, line: 13, col: 17, ), )), arguments: ExpressionList( span: Span( start: Position( value: 233, line: 13, col: 20, ), end: Position( value: 239, line: 13, col: 26, ), ), items: [ This(String(StringLiteral( raw: "\"var\"", value: "var", span: Span( start: Position( value: 234, line: 13, col: 21, ), end: Position( value: 238, line: 13, col: 25, ), ), ))), ], ), ))), StringPart(StringLiteral( raw: "\",\n \"nerd\": \"", value: ",\n \"nerd\": ", span: Span( start: Position( value: 241, line: 13, col: 28, ), end: Position( value: 258, line: 13, col: 45, ), ), )), ExpressionPart(Identifier(Ok(Token( kind: Ident, text: "output_file", start: Position( value: 261, line: 14, col: 17, ), )))), StringPart(StringLiteral( raw: "\",\n }", value: "\",\n }", span: Span( start: Position( value: 273, line: 14, col: 29, ), end: Position( value: 278, line: 14, col: 34, ), ), )), ], ), start: Position( value: 205, line: 12, col: 2, ), ), ], span: Span( start: Position( value: 157, line: 9, col: 10, ), end: Position( value: 281, line: 16, col: 0, ), ), )), span: Span( start: Position( value: 147, line: 9, col: 0, ), end: Position( value: 281, line: 16, col: 0, ), ), )), Attribute(Attribute( location: Position( value: 284, line: 18, col: 0, ), identifier: Ok(Token( kind: Ident, text: "skip", start: Position( value: 285, line: 18, col: 1, ), )), arguments: None, )), Request(Request( method: GET, endpoint: Pathname(Literal( value: "/api", span: Span( start: Position( value: 294, line: 19, col: 4, ), end: Position( value: 297, line: 19, col: 7, ), ), )), block: Some(Block( statements: [], span: Span( start: Position( value: 299, line: 19, col: 9, ), end: Position( value: 300, line: 19, col: 10, ), ), )), span: Span( start: Position( value: 290, line: 19, col: 0, ), end: Position( value: 300, line: 19, col: 10, ), ), )), Request(Request( method: PUT, endpoint: Pathname(Literal( value: "/api", span: Span( start: Position( value: 307, line: 21, col: 4, ), end: Position( value: 310, line: 21, col: 7, ), ), )), block: Some(Block( statements: [], span: Span( start: Position( value: 312, line: 21, col: 9, ), end: Position( value: 313, line: 21, col: 10, ), ), )), span: Span( start: Position( value: 303, line: 21, col: 0, ), end: Position( value: 313, line: 21, col: 10, ), ), )), Request(Request( method: PATCH, endpoint: Pathname(Literal( value: "/api", span: Span( start: Position( value: 321, line: 22, col: 6, ), end: Position( value: 324, line: 22, col: 9, ), ), )), block: Some(Block( statements: [], span: Span( start: Position( value: 326, line: 22, col: 11, ), end: Position( value: 327, line: 22, col: 12, ), ), )), span: Span( start: Position( value: 315, line: 22, col: 0, ), end: Position( value: 327, line: 22, col: 12, ), ), )), Request(Request( method: DELETE, endpoint: Pathname(Literal( value: "/api", span: Span( start: Position( value: 336, line: 23, col: 7, ), end: Position( value: 339, line: 23, col: 10, ), ), )), block: Some(Block( statements: [], span: Span( start: Position( value: 341, line: 23, col: 12, ), end: Position( value: 342, line: 23, col: 13, ), ), )), span: Span( start: Position( value: 329, line: 23, col: 0, ), end: Position( value: 342, line: 23, col: 13, ), ), )), ], )