Servostar / gemstone

Gemstone programming language compiler (GSC)
GNU General Public License v2.0
3 stars 0 forks source link

include comments in lexer #33

Closed flixm16 closed 5 months ago

flixm16 commented 5 months ago

include comments in lexer with the form:

# <every possible symbol> \n

don't forget to increment the linenumber after a comment

Servostar commented 5 months ago

Make sure to increment yylineno.

Servostar commented 5 months ago

Consider returning \n in lexer

flixm16 commented 5 months ago

consider using #.* for comments, because # starts a comment and .* matches any character except line terminators. with this the linebreak is seperated from the comment and yylineno can use it