Repository navigation
Split the Walker (refactor 3.2, S5) - #240
Merged
Merged
Conversation
Contributor
|
Web preview removed: the pull request is closed. |
sf624
force-pushed
the
refactor/3.2-split
branch
from
October 23, 2026 11:40
4455c29 to
0a400a4
Compare
…ts and aliases (refactor 3.2, S5) src/semantics/state.ts keeps the model (shellState, the strings it reads, childModel); the state it carries and how states merge move to src/semantics/shellstate.ts; the walk to src/semantics/walk/: walker.ts (the statements, jumps, loops, calls), arith.ts, conditions.ts, builtins.ts (what builtins and assignments change) and aliases.ts (the alias commands, and a command run through an alias). No change of behaviour: every test, the fixture dumps and the probes are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
sf624
force-pushed
the
refactor/3.2-split
branch
from
October 23, 2026 14:20
0a400a4 to
b882d81
Compare
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Step 3.2 of docs/design/refactor.md, layer 1 of 3 (stack: #240 → #241 → #242).
Addresses: S5 (the split; the reuse key and
opaqueare in #241)Walker(state.ts, ~2,700 lines) is split into src/semantics/walk/:walker.ts(the walk: units, statements, jumps, loops, calls, substitutions),arith.ts(the walk's arithmetic),conditions.ts(statuses,[ ]/[[ ]]/case, decisions),builtins.ts(builtin effects and assignments),aliases.ts(alias commands and expansion),shared.ts(errors,Operand, the text parser). The state and its merge move to src/semantics/shellstate.ts (re-exported by state.ts); state.ts keeps the model (shellState,Scripts,childModel).Pure move, no change of behaviour: the whole suite, every probe test, test/decisions.test.ts and the dumps of every fixture (sample.sh, coverage.sh, posix.sh, ksh.ksh, hosts/*) are unchanged. Node 24 coverage 100%, snippets check clean. Walk time unchanged (bundled bench, noise-level).
🤖 Generated with Claude Code