@@ -1851,6 +1851,103 @@ $BackgroundColor
18511851 </TableRowEntries >
18521852 </TableControl >
18531853 </View >
1854+ <View >
1855+ <Name >PipeScript.Sentence</Name >
1856+ <ViewSelectedBy >
1857+ <TypeName >PipeScript.Sentence</TypeName >
1858+ </ViewSelectedBy >
1859+ <CustomControl >
1860+ <CustomEntries >
1861+ <CustomEntry >
1862+ <CustomItem >
1863+ <ExpressionBinding >
1864+ <ScriptBlock >$moduleName = 'PipeScript'
1865+
1866+ do {
1867+ $lm = Get-Module -Name $moduleName -ErrorAction Ignore
1868+ if (-not $lm) { continue }
1869+ if ($lm.FormatPartsLoaded) { break }
1870+ $wholeScript = @(foreach ($formatFilePath in $lm.exportedFormatFiles) {
1871+ foreach ($partNodeName in Select-Xml -LiteralPath $formatFilePath -XPath "/Configuration/Controls/Control/Name[starts-with(., '$')]") {
1872+ $ParentNode = $partNodeName.Node.ParentNode
1873+ "$($ParentNode.Name)={
1874+ $($ParentNode.CustomControl.CustomEntries.CustomEntry.CustomItem.ExpressionBinding.ScriptBlock)}"
1875+ }
1876+ }) -join [Environment]::NewLine
1877+ New-Module -Name "${ModuleName}.format.ps1xml" -ScriptBlock ([ScriptBlock]::Create(($wholeScript + ';Export-ModuleMember -Variable *'))) |
1878+ Import-Module -Global
1879+ $onRemove = [ScriptBlock]::Create("Remove-Module '${ModuleName}.format.ps1xml'")
1880+
1881+ if (-not $lm.OnRemove) {
1882+ $lm.OnRemove = $onRemove
1883+ } else {
1884+ $lm.OnRemove = [ScriptBlock]::Create($onRemove.ToString() + '' + [Environment]::NewLine + $lm.OnRemove)
1885+ }
1886+ $lm | Add-Member NoteProperty FormatPartsLoaded $true -Force
1887+
1888+ } while ($false)
1889+
1890+
1891+ @(& ${PipeScript_Format-RichText} -ForegroundColor 'Verbose' -NoClear) -join ''</ScriptBlock >
1892+ </ExpressionBinding >
1893+ <ExpressionBinding >
1894+ <ItemSelectionCondition >
1895+ <ScriptBlock > $_.Command </ScriptBlock >
1896+ </ItemSelectionCondition >
1897+ <PropertyName >Keyword</PropertyName >
1898+ </ExpressionBinding >
1899+ <ExpressionBinding >
1900+ <ScriptBlock >@(& ${PipeScript_Format-RichText} -ForegroundColor 'Verbose' ) -join ''</ScriptBlock >
1901+ </ExpressionBinding >
1902+ <ExpressionBinding >
1903+ <ScriptBlock >@(& ${PipeScript_Format-RichText} -ForegroundColor 'Success' -NoClear) -join ''</ScriptBlock >
1904+ </ExpressionBinding >
1905+ <ExpressionBinding >
1906+ <ItemSelectionCondition >
1907+ <ScriptBlock > $_.Command </ScriptBlock >
1908+ </ItemSelectionCondition >
1909+ <ScriptBlock > " < # $($_.Command) #> " </ScriptBlock >
1910+ </ExpressionBinding >
1911+ <ExpressionBinding >
1912+ <ScriptBlock >@(& ${PipeScript_Format-RichText} -ForegroundColor 'Success' ) -join ''</ScriptBlock >
1913+ </ExpressionBinding >
1914+ <ExpressionBinding >
1915+ <ScriptBlock > ' ' </ScriptBlock >
1916+ </ExpressionBinding >
1917+ <ExpressionBinding >
1918+ <ScriptBlock >
1919+ @(foreach ($clause in $_.Clauses) {
1920+ $wordNumber = -1
1921+ foreach ($word in $clause.Words) {
1922+ $wordNumber++
1923+ if (-not $wordNumber) {
1924+ & ${PipeScript_Format-RichText} -ForegroundColor Warning -InputObject "$word"
1925+ } else {
1926+ & ${PipeScript_Format-RichText} -InputObject "$word"
1927+ }
1928+ }
1929+ }) -join ' '
1930+ </ScriptBlock >
1931+ </ExpressionBinding >
1932+ <ExpressionBinding >
1933+ <ScriptBlock >@(& ${PipeScript_Format-RichText} -ForegroundColor 'Magenta' -NoClear) -join ''</ScriptBlock >
1934+ </ExpressionBinding >
1935+ <ExpressionBinding >
1936+ <ItemSelectionCondition >
1937+ <ScriptBlock > $_.Arguments -and -not $_.Clauses </ScriptBlock >
1938+ </ItemSelectionCondition >
1939+ <ScriptBlock >
1940+ $_.Arguments -join ' '
1941+ </ScriptBlock >
1942+ </ExpressionBinding >
1943+ <ExpressionBinding >
1944+ <ScriptBlock >@(& ${PipeScript_Format-RichText} -ForegroundColor 'Magenta' ) -join ''</ScriptBlock >
1945+ </ExpressionBinding >
1946+ </CustomItem >
1947+ </CustomEntry >
1948+ </CustomEntries >
1949+ </CustomControl >
1950+ </View >
18541951 <View >
18551952 <Name >PipeScript.Transpiler</Name >
18561953 <ViewSelectedBy >
0 commit comments