Skip to content

Commit 1aa3e7d

Browse files
committed
Added some TODO comments
1 parent 40e0715 commit 1aa3e7d

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

rusty_parser/src/built_ins/open.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ pub fn parse() -> impl Parser<StringView, Output = Statement, Error = ParserErro
1111
seq6(
1212
keyword(Keyword::Open),
1313
ws_expr_pos_ws_p().or_expected("file name after OPEN"),
14+
// keyword::For or Keyword::Access or Keyword::AS
15+
// TODO merge the next 3 parsers altogether
1416
parse_open_mode_p().to_option(),
1517
parse_open_access_p().to_option(),
1618
parse_file_number_p().or_expected("AS file-number"),
@@ -64,6 +66,8 @@ fn parse_file_number_p() -> impl Parser<StringView, Output = ExpressionPos, Erro
6466
.and_keep_right(guarded_file_handle_or_expression_p().or_expected("#file-number%"))
6567
}
6668

69+
// TODO LEN does not need whitespace if the file expression was in parenthesis
70+
// i.e. OPEN "input.txt" AS (#1)LEN = 10 should be supported.
6771
fn parse_len_p() -> impl Parser<StringView, Output = ExpressionPos, Error = ParserError> {
6872
seq3(
6973
lead_ws(keyword_ignoring(Keyword::Len)),

0 commit comments

Comments
 (0)