Repository navigation
shell/syntax: add typed parser error context - #792
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 75098b9f7e
ℹ️ 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".
75098b9 to
503e35b
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 503e35bad8
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4412c1b9bd
ℹ️ 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".
Summary
]], and empty[[ ... ]]failuresWhy
A few malformed parser cases still only carried message text, which forced
BashError()compatibility to special-case strings instead of using structured context from the originating parser branch.Impact
This keeps successful parsing unchanged, preserves existing raw
ParseError.Textstrings, and makes bash-style formatting for these malformed cases depend on typed parser context rather than brittle text matching.Validation
go test ./shell/syntax -run 'TestParseError(BashErrorParseCompatibility|BashErrorConditionalDiagnostics|TypedContext)$'go test ./shell/syntax -run 'TestParseErr$'go test ./shell/syntaxgo test ./internal/shell/interp -run 'TestDbracketParseErrorAbortsScript$'make lint