flofriday / Moose

🐐 A new fun programming language
MIT License
6 stars 1 forks source link

String literal highlighting glitch #47

Closed flofriday closed 1 year ago

flofriday commented 1 year ago

image

flofriday commented 1 year ago

The String location will always be two characters to short. This is because we don't store the quotation marks in the lexme of the token but we ofset the start of the token correctly.

flofriday commented 1 year ago

image

I fixed it by giving each token a location so we we have finer granularity of their positions.