---
source: crates/squawk_syntax/src/test.rs
input_file: crates/squawk_parser/tests/data/plpgsql/err/close_stmt.sql
---
PLPGSQL@0..83
WHITESPACE@0..1 "\n"
PLPGSQL_BLOCK@1..82
PLPGSQL_DECLARE_SECTION@1..23
DECLARE_KW@1..8 "declare"
WHITESPACE@8..11 "\n "
PLPGSQL_VAR_DECL@11..23
PLPGSQL_VAR_NAME@11..12
IDENT@11..12 "c"
WHITESPACE@12..13 " "
PATH_TYPE@13..22
PATH_REF@13..22
PATH_SEGMENT_REF@13..22
IDENT@13..22 "refcursor"
SEMICOLON@22..23 ";"
WHITESPACE@23..24 "\n"
BEGIN_KW@24..29 "begin"
WHITESPACE@29..32 "\n "
PLPGSQL_BODY@32..78
PLPGSQL_CLOSE_STMT@32..38
CLOSE_KW@32..37 "close"
SEMICOLON@37..38 ";"
WHITESPACE@38..41 "\n "
PLPGSQL_CLOSE_STMT@41..46
CLOSE_KW@41..46 "close"
WHITESPACE@46..47 " "
ERROR@47..51
ALL_KW@47..50 "all"
SEMICOLON@50..51 ";"
WHITESPACE@51..54 "\n "
PLPGSQL_CLOSE_STMT@54..64
CLOSE_KW@54..59 "close"
WHITESPACE@59..60 " "
PLPGSQL_CURSOR_VARIABLE_REF@60..61
IDENT@60..61 "c"
ERROR@61..63
FIELD_ACCESSOR@61..63
DOT@61..62 "."
COMPOSITE_FIELD_REF@62..63
IDENT@62..63 "x"
SEMICOLON@63..64 ";"
WHITESPACE@64..67 "\n "
PLPGSQL_CLOSE_STMT@67..78
CLOSE_KW@67..72 "close"
WHITESPACE@72..73 " "
PLPGSQL_CURSOR_VARIABLE_REF@73..74
IDENT@73..74 "c"
ERROR@74..77
INDEX_ACCESSOR@74..77
L_BRACK@74..75 "["
LITERAL@75..76
INT_NUMBER@75..76 "1"
R_BRACK@76..77 "]"
SEMICOLON@77..78 ";"
WHITESPACE@78..79 "\n"
END_KW@79..82 "end"
WHITESPACE@82..83 "\n"
error[syntax-error]: expected a cursor variable, got SEMICOLON
╭▸
5 │ close;
╰╴ ━
error[syntax-error]: expected a cursor variable, got ALL_KW
╭▸
6 │ close all;
╰╴ ━
error[syntax-error]: expected SEMICOLON
╭▸
6 │ close all;
╰╴ ━
error[syntax-error]: expected a statement, got ALL_KW
╭▸
6 │ close all;
╰╴ ━
error[syntax-error]: a cursor variable must be a simple variable
╭▸
7 │ close c.x;
╰╴ ━
error[syntax-error]: a cursor variable must be a simple variable
╭▸
8 │ close c[1];
╰╴ ━