diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2005-07-02 05:13:16 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2005-07-02 05:13:16 +0000 |
commit | 2e8eada098c43e53c79a2aa9a4627267006b9a26 (patch) | |
tree | 00b22ccf1f884bdbbeaaf8ab9e9e912afde5007f /usr/local/www/code-syntax-highlighter/shBrushVb.js | |
parent | 540b0ca74bc19669c7e03c65c1e62a5795c9b232 (diff) | |
download | pfsense-2e8eada098c43e53c79a2aa9a4627267006b9a26.zip pfsense-2e8eada098c43e53c79a2aa9a4627267006b9a26.tar.gz |
Add source code highlighting support
Diffstat (limited to 'usr/local/www/code-syntax-highlighter/shBrushVb.js')
-rw-r--r-- | usr/local/www/code-syntax-highlighter/shBrushVb.js | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/usr/local/www/code-syntax-highlighter/shBrushVb.js b/usr/local/www/code-syntax-highlighter/shBrushVb.js new file mode 100644 index 0000000..197adcc --- /dev/null +++ b/usr/local/www/code-syntax-highlighter/shBrushVb.js @@ -0,0 +1,29 @@ +dp.sh.Brushes.Vb = function() +{ + var keywords = 'AddHandler AddressOf AndAlso Alias And Ansi As Assembly Auto ' + + 'Boolean ByRef Byte ByVal Call Case Catch CBool CByte CChar CDate ' + + 'CDec CDbl Char CInt Class CLng CObj Const CShort CSng CStr CType ' + + 'Date Decimal Declare Default Delegate Dim DirectCast Do Double Each ' + + 'Else ElseIf End Enum Erase Error Event Exit False Finally For Friend ' + + 'Function Get GetType GoSub GoTo Handles If Implements Imports In ' + + 'Inherits Integer Interface Is Let Lib Like Long Loop Me Mod Module ' + + 'MustInherit MustOverride MyBase MyClass Namespace New Next Not Nothing ' + + 'NotInheritable NotOverridable Object On Option Optional Or OrElse ' + + 'Overloads Overridable Overrides ParamArray Preserve Private Property ' + + 'Protected Public RaiseEvent ReadOnly ReDim REM RemoveHandler Resume ' + + 'Return Select Set Shadows Shared Short Single Static Step Stop String ' + + 'Structure Sub SyncLock Then Throw To True Try TypeOf Unicode Until ' + + 'Variant When While With WithEvents WriteOnly Xor'; + + this.regexList = [ + { regex: new RegExp('\'.*$', 'gm'), css: 'comment' }, // one line comments + { regex: new RegExp('"(?:\\.|[^\\""])*"', 'g'), css: 'string' }, // strings + { regex: new RegExp('^\\s*#.*', 'gm'), css: 'preprocessor' }, // preprocessor tags like #region and #endregion + { regex: new RegExp(this.GetKeywords(keywords), 'gm'), css: 'keyword' } // c# keyword + ]; + + this.CssClass = 'dp-vb'; +} + +dp.sh.Brushes.Vb.prototype = new dp.sh.Highlighter(); +dp.sh.Brushes.Vb.Aliases = ['vb', 'vb.net']; |