-
-
Notifications
You must be signed in to change notification settings - Fork 174
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix PowerShell code block inlining in compiler
This commit enhances the compiler's ability to inline PowerShell code blocks. Previously, the compiler attempted to inline all lines ending with brackets (`}` and `{`) using semicolons, which leads to syntax errors. This improvement allows for more flexible PowerShell code writing with reliable outcomes. Key Changes: - Update InlinePowerShell pipe to handle code blocks specifically - Extend unit tests for the InlinePowerShell pipe Other supporting changes: - Refactor InlinePowerShell tests for improved scalability - Enhance pipe unit test running with regex support - Expand test coverage for various PowerShell syntax used in privacy.sexy - Update related interfaces to align with new code conventions, dropping `I` prefix - Optimize line merging to skip lines already ending with semicolons
- Loading branch information
1 parent
f89c232
commit 15d7877
Showing
25 changed files
with
3,610 additions
and
492 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
...cript/Compiler/Expressions/Pipes/IPipe.ts → ...Script/Compiler/Expressions/Pipes/Pipe.ts
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
export interface IPipe { | ||
export interface Pipe { | ||
readonly name: string; | ||
apply(input: string): string; | ||
} |
6 changes: 3 additions & 3 deletions
6
...Parser/Executable/Script/Compiler/Expressions/Pipes/PipeDefinitions/EscapeDoubleQuotes.ts
This file contains 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
This file contains 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
This file contains 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
14 changes: 7 additions & 7 deletions
14
...r/Executable/Script/Compiler/Expressions/Pipes/PipeDefinitions/EscapeDoubleQuotes.spec.ts
This file contains 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
Oops, something went wrong.