source-academy / py-slang

Python sublanguage for SICP
Apache License 2.0
0 stars 0 forks source link

Tokenizer/Parser: Need to handle multi-line parantheses #3

Closed Fidget-Spinner closed 1 year ago

Fidget-Spinner commented 1 year ago

E.g. the following valid Python code is currently rejected

def foo(a,
    b,
    c):
    pass

We should support it by either transforming the DEDENT/INDENT the tokenizer outputs, or add explicit rules in the parser to allow it.

Fidget-Spinner commented 1 year ago

Fixed by https://github.com/source-academy/py-slang/commit/7f8c4903291fd14551e6244edcfc50a686c6df3b.