aboutsummaryrefslogtreecommitdiff
path: root/src/parser.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/parser.h')
-rw-r--r--src/parser.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/parser.h b/src/parser.h
index fceedc0..6392c24 100644
--- a/src/parser.h
+++ b/src/parser.h
@@ -14,10 +14,20 @@ enum {
‘x: lhs = rhs’ */
ASTDECL,
+ /* Public variable declaration, lhs and rhs may be unused
+ ‘pub x: lhs = rhs’ */
+ ASTPDECL,
+
/* Constant declaration, lhs may be unused
‘x: lhs : rhs’ */
ASTCDECL,
+ /* Public constant declaration, lhs may be unused
+ ‘pub x: lhs : rhs’ */
+ ASTPCDECL,
+
+ _AST_DECLS_END = ASTPCDECL,
+
/* Function prototype
‘(a: b, c: d) rhs’; aux[lhs].fnproto */
ASTFNPROTO,
@@ -75,4 +85,8 @@ struct ast {
/* Parse the tokens in TOKS into an abstract syntax tree */
struct ast parsetoks(struct lexemes toks);
+/* Starting from the node at indent I in AST, return the index of the next node
+ in AST that is of the same nest-depth as I */
+idx_t_ fwdnode(struct ast ast, idx_t_ i);
+
#endif /* !ORYX_PARSER_H */