Commit Graph

122 Commits

Author SHA1 Message Date
Sasha Koshka
0025d03a18 Modified parser data test to have uninitialized pointer cases 2022-08-16 16:16:39 -04:00
Sasha Koshka
45bc798d19 Added identifier and declaration parsing 2022-08-16 15:53:32 -04:00
Sasha Koshka
9cb2f68581 Argument kind is now called .kind instead of .what 2022-08-16 15:50:34 -04:00
Sasha Koshka
4dfb327558 Add subscript and dereference argument kinds 2022-08-16 13:43:36 -04:00
Sasha Koshka
f978621673 Parse basic information about data sections (name, type) 2022-08-16 10:44:02 -04:00
Sasha Koshka
ac40fa96e5 Improved parser test
Created new cases involving mutable data and phrase initialization arguments,
and always print out the correct and parsed trees.
2022-08-16 01:55:22 -04:00
Sasha Koshka
85b7938843 ParseBody now has a loop, and errors on unrecognized section type 2022-08-15 21:20:13 -04:00
Sasha Koshka
e42bad5810 Identifiers can no longer have arguments in them
Previously [[something something].something] would have been syntactically
correct. This can lead to ugly and cluttered syntax due to violating the one
thing per line guideline (that I've forgotten to write down) and would make the
parser incredibly convoluded. Member selection in arf is not an operator and
should not be treated as such. It would be much better to just use variables for
this.
2022-08-15 17:05:57 -04:00
Sasha Koshka
614b5664fc Parser calls ParseDataSection 2022-08-15 15:09:07 -04:00
Sasha Koshka
3a3c588023 Added data test 2022-08-15 14:23:53 -04:00
Sasha Koshka
00bcfaab0b Parser tests now work by checking the ToString() of the parsed tree 2022-08-15 14:17:29 -04:00
Sasha Koshka
d91423863b Added ToString methods for syntax tree nodes 2022-08-15 14:04:57 -04:00
Sasha Koshka
b02ff6cda6 Created structs needed to represent a data section 2022-08-15 01:47:42 -04:00
Sasha Koshka
0a067524ce Added base parse body function 2022-08-14 22:38:57 -04:00
714aca5196 Fix parseMeta not getting enough tokens
Parser now passes TestMeta
2022-08-12 17:12:38 -05:00
033e64fc54 Parser can now print out a list of expected token kinds 2022-08-12 17:09:37 -05:00
f23c3a234a Added metadata parser 2022-08-12 16:22:51 -05:00
050c956787 Added expect and nextToken methods to parser 2022-08-12 13:33:21 -05:00
18bd681082 Parser now understands the separation between files
This needs to be done because each file has a metadata section at the top.
2022-08-12 12:02:20 -05:00
2019c67bbb Created basic test for parser 2022-08-12 11:55:17 -05:00
81b47f7734 Replaced all occurences of github.com with git.tebibyte.media 2022-08-12 10:21:36 -05:00
09170e390d Created base for parser
The parser now handles file opening and invokes the lexer.
2022-08-12 10:11:43 -05:00