Skip to content

[New] Parse Ellipsis and None #510

@Thirumalai-Shaktivel

Description

@Thirumalai-Shaktivel

Example:

def test() -> None:
    pass

Error:

$ lpython --show-ast --new-parser examples/expr2.py
syntax error: Token 'None' (of type 'none') is unexpected here
 --> examples/expr2.py:1:15
  |
1 | def test() -> None:
  |               ^^^^ 


Note: if any of the above error or warning messages are not clear or are lacking
context please report it to us (we consider that a bug that needs to be fixed).

Example 2:

def test():
    ...

Error:

$ lpython --show-ast --new-parser examples/expr2.py
syntax error: Token '...' is unexpected here
 --> examples/expr2.py:2:5
  |
2 |     ...
  |     ^^^ 


Note: if any of the above error or warning messages are not clear or are lacking
context please report it to us (we consider that a bug that needs to be fixed).

Metadata

Metadata

Assignees

No one assigned

    Labels

    ParserIssues or improvements related to parser

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions