You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PR #68 added equivalent native-argument fragment walks to the Bash and PowerShell parsers. Both implementations now collect contiguous lexer fragments, preserve the complete raw span and decoded value, detect opaque fragments, and safe-fail resolver-sensitive mixed quoting. Keeping those rules duplicated creates a drift risk when another fragment shape or shell is added.
This is not a request for a shared lexer or parser core. Bash and PowerShell must retain their shell-specific tokenization, quoting, recursion, and command semantics.
Proposed scope
Extract an internal shell-neutral classification result for one native argument assembled from parser-owned lexer fragments. Each parser adapts its own tokens into the helper and remains responsible for consuming the resulting token range.
The shared result should carry:
the complete authored source span and raw value;
the combined decoded logical value;
whether any fragment is opaque or computed;
whether all value fragments are literal;
whether mixed literal and expandable fragments contain resolver-sensitive syntax;
the first index after the consumed fragment run.
Non-goals
Unifying the Bash and PowerShell lexers.
Building a shared parser base class.
Changing the public AST or parser APIs.
Weakening DynamicSkip behavior for ambiguous mixed quoting.
Acceptance criteria
Bash and PowerShell use one internal fragment-classification implementation.
Shell-specific token adapters remain small and explicit.
Existing Raw, Value, source-span, path, and DynamicSkip behavior remains unchanged.
Problem
PR #68 added equivalent native-argument fragment walks to the Bash and PowerShell parsers. Both implementations now collect contiguous lexer fragments, preserve the complete raw span and decoded value, detect opaque fragments, and safe-fail resolver-sensitive mixed quoting. Keeping those rules duplicated creates a drift risk when another fragment shape or shell is added.
This is not a request for a shared lexer or parser core. Bash and PowerShell must retain their shell-specific tokenization, quoting, recursion, and command semantics.
Proposed scope
Extract an internal shell-neutral classification result for one native argument assembled from parser-owned lexer fragments. Each parser adapts its own tokens into the helper and remains responsible for consuming the resulting token range.
The shared result should carry:
Non-goals
DynamicSkipbehavior for ambiguous mixed quoting.Acceptance criteria
Raw,Value, source-span, path, andDynamicSkipbehavior remains unchanged.@transformation remain green in both shells.dotnet build -c Release,dotnet test -c Release, and header verification pass.Extraction trigger
Do this before adding a third shell or another native fragment rule. Until then, the current duplication is correct but carries maintenance cost.