mirror of
https://github.com/Ed94/WATL_Exercise.git
synced 2025-08-05 14:52:44 -07:00
readme update
This commit is contained in:
12
Readme.md
12
Readme.md
@@ -3,3 +3,15 @@
|
||||
An exercise on making the simplest useful parser with different languages or conventions.
|
||||
|
||||
The C code conveys a convention for doing C I've synthesized after studying how several people in the "handmade" community have written their exposed libraries or codebases.
|
||||
|
||||
The goal of the exercise is always the following:
|
||||
```odin
|
||||
start:
|
||||
file_contents := file.read_contents(self.source)
|
||||
tokens := watl.lex(file_contents)
|
||||
str_cache := str.cache.init()
|
||||
lines := watl.parse(tokens)
|
||||
listing := watl.dump_listing(lines)
|
||||
file.write_str(str_fmt("<name>.listing.source", self.source.name))
|
||||
end
|
||||
```
|
||||
|
Reference in New Issue
Block a user