First stage finished!
So I have implemented the basics in ruby and it's getting a bit too long for one script. I've also gained some idea of how the full version should be structured, so guess it's time for crystal now. Also I guess I promised repo so here you go:
There is not that much to see now though.
stuff that works:
- text formatting
- colors (only by name)
- indentation (only by level)
stuff learned:
- you test for numeric text with /^\d+$/ or /^\-?\d+$/ .
- calling lambda with extra argument will end .each loop, but not program.
- newlines in terminal act weird when you change background color (currently unfixed)
Also sometimes it's easier to use for loop than regex for splitting text, espessially when you want ignore stuff in brackets.
Also I don't expect this to cause problems, since I don't plan to do anything crazy with the language, but I want ptts to compile on ^C, which has 4 years old version of crystal, so that sounds like fun.
----------------------------