I’m stuck on Stage #TZ7
I already have the default case in my switch statement designed to print out what they’re asking for in this stage, I’m really not clear on why I’m not detecting these characters at all.
Here are my logs:
remote: [tester::#TZ7] Running tests for Stage #TZ7 (Scanning: Multi-line errors)
remote: [tester::#TZ7] [test-1] Running test case: 1
remote: [tester::#TZ7] [test-1] Writing contents to ./test.lox:
remote: [tester::#TZ7] [test-1] [test.lox] ()<|SPACE|><|TAB|>@
remote: [tester::#TZ7] [test-1] $ ./your_program.sh tokenize test.lox
remote: [your_program] Logs from your program will appear here!
remote: [your_program] LEFT_PAREN ( null
remote: [your_program] RIGHT_PAREN ) null
remote: [your_program] EOF null
And here’s a snippet of my code in my scanner.go class:
case '\n':
s.currentLine++
return nil, ""
case ' ', '\r', '\t':
s.current++
return nil, ""
default:
err := fmt.Sprintf("[line %d] Error: Unexpected character: %c\n", s.currentLine, currToken)
return nil, err
}