0x5DA · @0x5DA
24 followers · 384 posts · Server fosstodon.org

now parsing:
- `goto`
- labels
- loops
- returns

only need to implement variable declaration before i've gone through the easy stuff. type bounds will be a lot - and then there's expressions to implement.. yikes

#langdev #sdw

Last updated 1 year ago

0x5DA · @0x5DA
24 followers · 376 posts · Server fosstodon.org

finally was bothered to pick up `sdw` again. printing and some formatting:

(also *christ* that lexer is slow - what the hell did i do??)

#langdev #sdw

Last updated 1 year ago

0x5DA · @0x5DA
23 followers · 365 posts · Server fosstodon.org

function arg parsing. took a little longer than i might've hoped because the grammar changes between stubs & bodied functions. but it works :)

think some sort of printing is in order. rust's `fmt::Debug` prints span info which clutters `stdout` -.-

will take a look at it. it'd be an interesting use for a procedural macro (because i'd rather not have to implement manually) but i also don't want to have to make a `sdw_proc` crate ._.

#langdev #sdw

Last updated 1 year ago

0x5DA · @0x5DA
23 followers · 361 posts · Server fosstodon.org

working on the parser again. pretty chill. slow going because i kept changing the structure, but i got it to a state where i _think_ it'll be serviceable for the future.

i made a little way into function parsing. stubs don't work with parameters, and functions.. do something wacky anyway. it's too late for debugging, though 😅

ah well

#langdev #sdw

Last updated 1 year ago

0x5DA · @0x5DA
24 followers · 347 posts · Server fosstodon.org

idly messing around with a parser structure which respects errors. this _might_ work. i think it might break in more complex cases, though.

we'll see. i'll try flesh the parser out some.

#langdev #sdw

Last updated 1 year ago

0x5DA · @0x5DA
24 followers · 346 posts · Server fosstodon.org

re-re-writing `sdwc`. i don't really know why. just bored.

anyway i wrote a whole design doc for it so i can implement whole compiler stages at a time.

first stop: lexing. this time i actually implemented multiline errors too.

debating whether error recovery is worth it. bootstrapping the compiler with only 1 error at a time would be miserable, and retrofitting recovery later would be worse. but.. lazy..

#langdev #sdw

Last updated 1 year ago

0x5DA · @0x5DA
13 followers · 115 posts · Server fosstodon.org

i might've gotten sidetracked and implemented loops, break, continue, variable reassignment & standalone function calls

#sdw #langdev

Last updated 1 year ago

Twig · @Twig
25 followers · 27 posts · Server mastodonapp.uk
Twig · @Twig
27 followers · 30 posts · Server mastodonapp.uk
Lars Hünerfürst · @lars_vom_See
10 followers · 76 posts · Server troet.cafe