Hi @andy1li. It’s in file src/scanner lines 185-199. When I encounter slash two times in a row i go into comment mode until I encounter ‘\n’. In comment mode all symbols are just skipped.
The code should ignore comments, but it still should output EOF. For me it does
❯ cat test.lox
//Comment%
❯ ./your_program.sh tokenize test.lox
Compiled in 0.01s
Compiled in 0.01s
Running main.main
EOF null