From 930ca8d3b760b33123ba877514a49eca5af35a6a Mon Sep 17 00:00:00 2001 From: c+1 Date: Tue, 21 Nov 2023 16:12:58 -0500 Subject: It is possible to parse strings. --- src/include/parser.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/include') diff --git a/src/include/parser.h b/src/include/parser.h index 59bbbb5..a349992 100644 --- a/src/include/parser.h +++ b/src/include/parser.h @@ -37,19 +37,19 @@ int parser_match(parser_t* parser, token_type_t type); /* Steps the parser forward by one token, then check whether the new token matches the given type. */ int parser_nxt_token_match(parser_t* parser, token_type_t type); -/* - Parse a single literal value. - - Only does integers for now. -*/ -tree_t* parser_parse_lit(parser_t* parser); +/* Return the tree for an integer. */ +tree_t* parser_parse_lint(parser_t* parser); -/* Return a tree for a single semicolon-separated expression.*/ +/* Return the tree for a string. */ +tree_t* parser_parse_lstr(parser_t* parser); + +/* Return the tree for an expression.*/ tree_t* parser_parse_expr(parser_t* parser); -/* Return a tree for a single curly-brace-separated expression. */ +/* Return the tree for an expression. */ tree_t* parser_parse_block(parser_t* parser); - +/* Parse. */ tree_t* parser_parse(parser_t* parser); /* Parse with the given parser. */ -- cgit v1.2.3