Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions IMPLEMENTATION_PLAN.md
Original file line number Diff line number Diff line change
Expand Up @@ -380,8 +380,15 @@ priorities.
unproved identities, and unknown receivers retain unknown/incomplete
facts. Module-qualified identities are catalogued, but the parser keeps
rejecting those forms atomically until the region-emission slice can
expose every body command. Continue in small slices with direct `&` / `.` and synchronous
current-runspace callbacks; child process/runspace jobs and parallel
expose every body command. The first direct-operator sub-slice now handles
currently supported command interiors in typed synchronous `& {}` and
`. {}` regions without synthetic host commands. It isolates ordinary
direct-call binding and command-resolution exit mutation, invalidates
explicitly escaping scope/provider mutation, carries shared location
outcomes, and keeps block arguments and leading `param()` declarations
atomic. Ordinary assignment state transfer remains an atomic task 7.5b
follow-up; task 7.5b is not complete. Continue with synchronous current-runspace callbacks;
child process/runspace jobs and parallel
blocks; deferred breakpoint/event/completion actions; then unknown
receiver and nested/adversarial matrices. Preserve script blocks proved
to be data as opaque values, expose ambiguous bodies with incomplete
Expand Down
18 changes: 14 additions & 4 deletions src/ShellSyntaxTree/Internal/Pwsh/Parsing/PwshCommandParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,14 @@ private static bool TryDetectUnsupportedInvocationShape(
index + 1 < tokens.Count &&
tokens[index + 1].Kind == PwshTokenKind.ScriptBlock)
{
reason = "call-operator script blocks are not supported in v0.3";
return true;
if (!verbSlot)
{
reason = "a call-operator script block is only supported at command position";
return true;
}

verbSlot = false;
continue;
}

verbSlot = token.OperatorText is "&&" or "||" or ";" or "|" or "(" or "&";
Expand All @@ -218,8 +224,12 @@ private static bool TryDetectUnsupportedInvocationShape(
{
if (token.Value == ".")
{
reason = "the dot-source invocation operator is not supported in v0.2";
return true;
if (index + 1 >= tokens.Count ||
tokens[index + 1].Kind != PwshTokenKind.ScriptBlock)
{
reason = "the dot-source invocation operator is not supported in v0.2";
return true;
}
}

if (IsUnsupportedModuleQualifiedCmdlet(token.Value))
Expand Down
Loading