Repository navigation
Introduce SourceManager and parser-independent PyHIR - #3
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2b5ebeb8f4
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| arguments.posonlyargs or arguments.kwonlyargs or arguments.vararg or arguments.kwarg | ||
| ) | ||
| if has_advanced_arguments or arguments.defaults or arguments.kw_defaults: | ||
| self.fail(arguments, "only required positional arguments are supported") |
There was a problem hiding this comment.
Report default-argument errors at the function span
When a function with a default argument starts after line 1, this reports the error as 1:1 because ast.arguments has no lineno or col_offset, causing span() to use its fallbacks. For example, a def f(x=1) on line 4 produces x.py:1:1, contrary to the source-located diagnostic promised for unsupported syntax; pass the function node or the relevant default/argument node to fail() instead.
Useful? React with 👍 / 👎.
Introduce SourceManager and parser-independent PyHIR
Summary
Validation
This PR intentionally does not add CFG, SSA, Tree-sitter, or the plugin runtime. Those remain later incremental phases described in docs/architecture.md.