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
d081f363b1
Add guideline I forgot to add earlier
2022-08-15 17:21:34 -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
8b28fe5a4c
Added a comma token
2022-08-15 14:50:09 -04:00
Sasha Koshka
608162fa92
Fixed bug in number lexing function that prevented reading zero
2022-08-15 14:42:32 -04:00
Sasha Koshka
d27c0ff07c
Added single digit zero and eight to lexer number test
2022-08-15 14:32:59 -04:00
Sasha Koshka
7fc51c278f
Fixed issue with Error.Error not positioning marker correctly
2022-08-15 14:30:54 -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
sashakoshka
8f42fa9c2a
Add some more guidelines to readme
2022-08-12 20:32:58 -04:00
Sasha Koshka
cd157cc69b
Added more information about the language's design to readme
2022-08-09 21:15:49 -04:00
Sasha Koshka
488af74b75
Laid out basic lexer structure
2022-08-09 20:45:06 -04:00
Sasha Koshka
c23413eedf
Added print method to error
2022-08-09 20:12:33 -04:00
Sasha Koshka
a755fc9f41
Error handling is now done with a custom error in the file package
2022-08-09 02:25:45 -04:00
Sasha Koshka
2ea0c86c54
Added README
2022-08-09 01:51:56 -04:00
Sasha Koshka
3a0fc0d57c
Added ReadString method to file
2022-08-09 01:13:49 -04:00
Sasha Koshka
47517d7139
Added ReadRune method to file
2022-08-09 01:07:14 -04:00
Sasha Koshka
3ba528509c
Added licesnse
2022-08-09 01:02:03 -04:00
Sasha Koshka
e7bd6ee02c
Added stub arfc command
2022-08-08 03:09:16 -04:00
Sasha Koshka
e8f6165f38
Created stub high-level module compilation function
2022-08-08 03:08:50 -04:00
Sasha Koshka
93f0ac945f
Added gitignore
2022-08-08 03:08:20 -04:00
Sasha Koshka
47234e9f36
Added lexer stub
2022-08-07 15:18:59 -04:00
Sasha Koshka
68a6bdf511
Added token struct
2022-08-07 15:18:30 -04:00
Sasha Koshka
c3a5b15049
Added Location struct
...
Its purpose is to carry error reporting information with it outside of files.
2022-08-03 13:40:00 -04:00
Sasha Koshka
64a8a2445a
File is now capable of printing errors
2022-08-03 13:28:37 -04:00
Sasha Koshka
4d94e5738d
Added file struct that satisfies io/fs.File
...
This will be used to abstract os.File and enable error reporting.
2022-08-03 12:11:59 -04:00
Sasha Koshka
ff01213da4
Initial commit
2022-08-03 11:09:00 -04:00