Closed Fidget-Spinner closed 1 year ago
The following perfectly valid Pytho code leads the tokenizer/scanner to create wrong tokens:
def foo(): pass pass
To fix this, we should see how CPython solves it. I suspect it keeps track of a stack of indents/dedents.
Fixed by https://github.com/source-academy/py-slang/commit/1587bd56d80efdc061bdae7ce8b364e7f06a7284
The following perfectly valid Pytho code leads the tokenizer/scanner to create wrong tokens:
To fix this, we should see how CPython solves it. I suspect it keeps track of a stack of indents/dedents.