whimax07 / RepParse

0 stars 0 forks source link

RawToken API #3

Open whimax07 opened 2 years ago

whimax07 commented 2 years ago

Yo. An issue for moving from a simple two-pointer API to the RawToken API.

Here goes my LeetCode street cred. :)

@adhowell

P.s there is a way to turn alerts from this issue off. 👍

whimax07 commented 2 years ago

https://github.com/whimax07/RepParse/blob/acd6d8cf2dbc7a39eeebe673714d09f22ab5bb63/lib/Tokenizer.cpp#L25

Having asserted here feels bad. You should preferably throw close to your error.

https://github.com/whimax07/RepParse/blob/acd6d8cf2dbc7a39eeebe673714d09f22ab5bb63/lib/Tokenizer.cpp#L37-L46

I like having the producer of the raw function separated from the loop that converts them to Concrete tokens. I don't think the API is very well built for that so I want to tweak it a bit. Not sure how yet.