:= operator is valid in Python 3.13.0 but fails parsing with DT Python Parser

Open
#28 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
48/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
javascript, python
Domain
compilers

Research direction

Start by reproducing the reported x := 3 example through the parser entry point and inspect how assignment expressions are handled. The issue names no files or tests; done means valid Python 3.13 syntax produces a parse tree without error nodes or an uncaught NoViableAltException.

Written by the indexing model from the issue text.

Description

Try parsing the following Python code:
x = 1 print(x := 3)

You will get a tree full of error nodes. NoViableAltException appears to be thrown but caught and passed back.

That code is valid, though. I ran that in Python 3.13.0 as screenshotted here to demonstrate the code is valid:
Image

Dominant language
JavaScript
Stars
25
Forks
7
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from DTStack/dt-python-parser

All issues in DTStack/dt-python-parser

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.