Commit graph

3 commits

Author SHA1 Message Date
92a365d908 ast_nodes: add ReturnType, Identifier, Import
handling of ReturnType follows the hello.jt rule, that it's implicitly
void.

 - add Reader.peek, a repr, Reader.expect_val, Reader.ignore
 - add _fn_ret_type for ReturnType generation
 - fix some things when reading named functions
 - add read_import
 - add handler for unexpected reserved word
 - add some ast cleanups on a read_loop
 - add ast skip when token is None
2019-03-10 02:38:52 -03:00
b7d5646bad add classes for AST nodes
- add Reader.expect, Reader.next_safe
 - fix fn_read_args, use TypedVar
 - use Reader.expect in read_function's post-fn check
 - use Function in read_function
 - add basics of blocks using { and } in read_start
2019-03-10 02:13:22 -03:00
7ce0565de7 add basics of a handwritten parser
hell yeah i'm going down that path

lark made confusing stuff, i'll probably get more confused with a
handwritten one, but oh well, such is life
2019-03-10 01:55:12 -03:00