aboutsummaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorc2024-02-13 11:49:26 -0500
committerc2024-02-13 11:49:26 -0500
commit3dbe235f65987ae2bb34c6859926f33791feab67 (patch)
treef4ebe27796c02eba3bda728a17b98696c1fcdbe1 /src/include
parent78bdd279d90ace6e53a853a898f4819327e82743 (diff)
Definitions may now be parsed.
Diffstat (limited to 'src/include')
-rw-r--r--src/include/parser.h34
1 files changed, 19 insertions, 15 deletions
diff --git a/src/include/parser.h b/src/include/parser.h
index 257189d..839e372 100644
--- a/src/include/parser.h
+++ b/src/include/parser.h
@@ -47,37 +47,41 @@ tree_t* parser_parse_init(parser_t* parser);
/* Get tree for a block. */
tree_t* parser_parse_block(parser_t* parser);
+/* Get tree for a keyword. */
tree_t* parser_parse_kwd(parser_t* parser);
/* Get tree for an expression.*/
tree_t* parser_parse_expr(parser_t* parser);
-/*
- Check whether the current token matches the given type.
- - If it doesn't, return 0 and throw error.
-*/
-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);
-
/* Return the tree for an integer. */
tree_t* parser_parse_lint(parser_t* parser);
/* Return the tree for a string. */
tree_t* parser_parse_lstr(parser_t* parser);
-/* Return the tree for a definition's arguments. */
-tree_t* parser_parse_darg(parser_t* parser);
+/* Return the tree for a call. */
+tree_t* parser_parse_call(parser_t* parser);
+
+/* Return the tree for a call's arguments. */
+tree_t* parser_parse_carg(parser_t* parser);
/* Return the tree for a definition. */
tree_t* parser_parse_def(parser_t* parser);
-/* Return the tree for a call's arguments. */
-tree_t* parser_parse_carg(parser_t* parser);
+/* Return the tree for a definition tag. */
+tree_t* parser_parse_tag(parser_t* parser);
-/* Return the tree for a call. */
-tree_t* parser_parse_call(parser_t* parser);
+/* Return the tree for a definition's arguments. */
+tree_t* parser_parse_darg(parser_t* parser);
+
+/*
+ Check whether the current token matches the given type.
+ - If it doesn't, return 0 and throw error.
+*/
+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. */
void parser_parse(parser_t* parser);