aboutsummaryrefslogtreecommitdiff
path: root/src/include/parser.h
diff options
context:
space:
mode:
authorc+12023-11-21 16:12:58 -0500
committerc+12023-11-21 16:12:58 -0500
commit930ca8d3b760b33123ba877514a49eca5af35a6a (patch)
tree181b03509727a10ff0b41d76393ae0fa476c36fc /src/include/parser.h
parenta2a5e863dc9beb4bc7a73a7361d8e208599134c9 (diff)
It is possible to parse strings.
Diffstat (limited to 'src/include/parser.h')
-rw-r--r--src/include/parser.h16
1 files changed, 8 insertions, 8 deletions
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. */