diff options
author | Andreas Gohr <andi@splitbrain.org> | 2009-03-23 10:42:53 +0100 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2009-03-23 10:42:53 +0100 |
commit | 2b8d02bf0a560f0ee8fa887fed0d2bbf66b10bae (patch) | |
tree | d8fd32b508377b76b9213b0b67835eac9b003345 /inc/geshi/powershell.php | |
parent | ccf354b192cc6f8e554b4729cb1424b93bf82602 (diff) | |
download | rpg-2b8d02bf0a560f0ee8fa887fed0d2bbf66b10bae.tar.gz rpg-2b8d02bf0a560f0ee8fa887fed0d2bbf66b10bae.tar.bz2 |
GeSHi 1.0.8.3 update
Ignore-this: d204f804a634d5a537737dc4a50c3c13
darcs-hash:20090323094253-7ad00-003ea6c7b9cb1306ad0623274917bbfc042a0103.gz
Diffstat (limited to 'inc/geshi/powershell.php')
-rw-r--r-- | inc/geshi/powershell.php | 43 |
1 files changed, 36 insertions, 7 deletions
diff --git a/inc/geshi/powershell.php b/inc/geshi/powershell.php index 2544557d7..5b9e16bdc 100644 --- a/inc/geshi/powershell.php +++ b/inc/geshi/powershell.php @@ -4,7 +4,7 @@ * --------------------------------- * Author: Frode Aarebrot (frode@aarebrot.net) * Copyright: (c) 2008 Frode Aarebrot (http://www.aarebrot.net) - * Release Version: 1.0.8 + * Release Version: 1.0.8.3 * Date Started: 2008/06/20 * * PowerShell language file for GeSHi. @@ -139,6 +139,16 @@ $language_data = array ( '-Body', '-BinaryPathName', '-Begin', '-BackgroundColor', '-Average', '-AutoSize', '-Audit', '-AsString', '-AsSecureString', '-AsPlainText', '-As', '-ArgumentList', '-AppendPath', '-Append', '-Adjust', '-Activity', '-AclObject' + ), + 6 => array( + '_','args','DebugPreference','Error','ErrorActionPreference', + 'foreach','Home','Host','Input','LASTEXITCODE','MaximumAliasCount', + 'MaximumDriveCount','MaximumFunctionCount','MaximumHistoryCount', + 'MaximumVariableCount','OFS','PsHome', + 'ReportErrorShowExceptionClass','ReportErrorShowInnerException', + 'ReportErrorShowSource','ReportErrorShowStackTrace', + 'ShouldProcessPreference','ShouldProcessReturnPreference', + 'StackTrace','VerbosePreference','WarningPreference','PWD' ) ), 'SYMBOLS' => array( @@ -151,7 +161,8 @@ $language_data = array ( 2 => false, 3 => false, 4 => false, - 5 => false + 5 => false, + 6 => true ), 'STYLES' => array( 'KEYWORDS' => array( @@ -160,6 +171,7 @@ $language_data = array ( 3 => 'color: #0000FF;', 4 => 'color: #FF0000;', 5 => 'color: #008080; font-style: italic;', + 6 => 'color: #000080;' ), 'COMMENTS' => array( 1 => 'color: #008000;', @@ -199,13 +211,12 @@ $language_data = array ( 3 => '', 4 => '', 5 => '', + 6 => '', ), 'OOLANG' => false, 'OBJECT_SPLITTERS' => array( ), 'REGEXPS' => array( - // variables - 0 => "[\\$][a-zA-Z0-9_]*", // special after pipe 3 => array( GESHI_SEARCH => '(\[)(int|long|string|char|bool|byte|double|decimal|float|single|regex|array|xml|scriptblock|switch|hashtable|type|ref|psobject|wmi|wmisearcher|wmiclass|object)((\[.*\])?\])', @@ -233,18 +244,36 @@ $language_data = array ( ), // Special variables 6 => array( - GESHI_SEARCH => '(\$)(\$|\?|\$\^|_|args|DebugPreference|Error|ErrorActionPreference|foreach|Home|Input|LASTEXITCODE|MaximumAliasCount|MaximumDriveCount|MaximumFunctionCount|MaximumHistoryCount|MaximumVariableCount|PsHome|Host|OFS|ReportErrorShowExceptionClass|ReportErrorShowInnerException|ReportErrorShowSource|ReportErrorShowStackTrace|ShouldProcessPreference|ShouldProcessReturnPreference|StackTrace|VerbosePreference|WarningPreference|PWD)', + GESHI_SEARCH => '(\$)(\$[_\^]?|\?)(?!\w)', GESHI_REPLACE => '\1\2', GESHI_MODIFIERS => '', GESHI_BEFORE => '', - GESHI_AFTER => '\3' + GESHI_AFTER => '' ), + // variables + //BenBE: Please note that changes here and in Keyword group 6 have to be synchronized in order to work properly. + //This Regexp must only match, if keyword group 6 doesn't. If this assumption fails + //Highlighting of the keywords will be incomplete or incorrect! + 0 => "(?<!\\\$|>)[\\\$](?!(?:DebugPreference|Error(?:ActionPreference)?|". + "Ho(?:me|st)|Input|LASTEXITCODE|Maximum(?:AliasCount|DriveCount|". + "FunctionCount|HistoryCount|VariableCount)|OFS|P(?:WD|sHome)|". + "ReportErrorShow(?:ExceptionClass|InnerException|S(?:ource|". + "tackTrace))|S(?:houldProcess(?:Preference|ReturnPreference)|". + "tackTrace)|VerbosePreference|WarningPreference|_|args|foreach)\W)". + "(\w+)(?=[^|\w])", ), 'STRICT_MODE_APPLIES' => GESHI_NEVER, 'SCRIPT_DELIMITERS' => array( ), 'HIGHLIGHT_STRICT_BLOCK' => array( ), + 'PARSER_CONTROL' => array( + 'KEYWORDS' => array( + 6 => array( + 'DISALLOWED_BEFORE' => '(?<!\$)\$' + ) + ) + ) ); -?> +?>
\ No newline at end of file |