Commit graph

21 commits

Author SHA1 Message Date
a7034db0eb finish "parsing" of hello.jt
the AST is very ugly as it is rn. had to remove the cleanups or else its
all [[None], [None], ...]

ok im startnig to give up on doing handwritten lmao help

 - add TokenType.string
 - add read_value, read_statement, fix block reading
2019-03-10 03:04:37 -03:00
c2678fe360 better ast cleanup
- try to fix block parsing
2019-03-10 02:47:02 -03:00
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
9fda0b31c3 grammaer: more changes
i cant make sense of the errors lmao help
2019-03-09 20:05:03 -03:00
abdff4f65c put more things in grammar 2019-03-09 18:58:28 -03:00
09f230985e remove unused grammar file
since we're moving to lark
2019-03-09 16:58:46 -03:00
fe507437ea add install and usage to README 2019-03-09 16:54:47 -03:00
9e8a5abdaa package jortsc with setup.py
add lark parser as dep
2019-03-09 16:52:34 -03:00
a11d21873a finish basic token list 2019-03-09 00:02:13 -03:00
ece290e064 Merge branch 'master' of https://gitdab.com/luna/jorts 2019-03-08 23:43:56 -03:00
588b63fabe add basic lexer
also a draft grammar that i wont use probably
2019-03-08 23:43:17 -03:00
d12c913679 Merge branch 'master' of betseg/jorts into master 2019-03-08 22:15:09 +00:00
3caef4e7d6 Update 'examples/higher-order-functions.jt' 2019-03-08 22:14:08 +00:00
3c983b004c add jortsc/main.py 2019-03-08 18:50:58 -03:00
05c2563c7f remove c source 2019-03-08 18:47:00 -03:00
2d91393a1c add extending-structs.jt, struct-functions.jt
also sockets.jt lol
2019-03-08 18:45:33 -03:00
a4685423a4 add more examples 2019-03-08 18:30:30 -03:00
b3ac29fd3b add some stuff
i am a reasonable human being
2019-03-08 05:22:52 -03:00
b9439a921a Initial commit 2019-03-08 07:47:28 +00:00