Skip to content

Python parser misinterprets code-like text inside docstrings #6

Description

@Emp1500

What happened?

lib/parser/python.ts's tokenizer has no docstring-aware state — the COMPOUND regex (line 60) matches control-flow keywords the start of any line, including lines inside a '''/""" docstring. A docstring containing if this looks like code: produces spurious branch node that doesn't correspond to any real control flow.

Code snippet (if parser-related)


Environment

No response

Where did this happen?

Live site (code2flow-one.vercel.app)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomers

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions