A Lexer
So I'm making a programming language and the first step is the lexer I think. So here's my lexer. It's not the best, and I'll probably scrap this and make a better one, but I just started out and don't really know what I'm doing.
For the input, just enter a variable initialization like this:
// it only supports these three types right now
int answer = 10;
bool lightSwitch = false;
char letter = 's';
I'm still working in the parser though.
noice! i recommend regex for lexing the tokens
@ChezCoder oh yeah, I used regex for the numbers, but I guess I could also use it for the others as well
@DynamicSquid can i help you with your language?
@ChezCoder oh yeah sure! that'd be awesome! want me to invite you to the repl?
@DynamicSquid sure :)
@ChezCoder k, give me a sec
@DynamicSquid haii im on rn :D