⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 vbs_script_html.xs

📁 支持自定义语法高亮显示的编辑器控件
💻 XS
字号:
//Language: VB Script in HTML
//Copyright (c) 1992-2002 Altium Limited             
//All rights reserved.                               
//http://www.dream-com.com                           
//contact@dream-com.com                              

// states
State=snormal
State=sstring1
State=sstring2
State=sstring3
State=scomment1
State=scomment2
State=scomment3
State=shtmltag
State=shtmlVBS
// tokens
Token=tnone
Token=tstring
Token=tcomment
Token=tident
Token=tinteger
Token=tfloat
Token=tresword
Token=tassembler
Token=turl
Token=twhitespace
Token=tresword1
//delims
Delimiters=;.,:'"{}[]()?!@#$%^&*-+=|\/

//Common
snormal <                          shtmltag  tresword1
shtmltag [^\>^\'^\"^\0-9^#32^\=][^\>^\'^\"^#32^\=]* shtmltag  tresword1
shtmltag >                         snormal   tresword1

//snormal  <[/a-z_A-Z][a-z_A-Z0-9]*  shtmltag  tresword
//shtmltag [a-z_A-Z][a-z_A-Z0-9]*    shtmltag  tident
//shtmltag >                         snormal   tresword


// numbers
shtmltag [0-9][0-9]*              shtmltag  tinteger
shtmltag \#[0-9A-F]+              shtmltag  tinteger
shtmltag [1-9][0-9]*\.[0-9]*                    shtmltag  tfloat
shtmltag [1-9][0-9]*{\.[0-9]+}|e{[\+\-]}|[0-9]+ shtmltag   tfloat


//white space
snormal #32*                      snormal   twhitespace


//strings
shtmltag   \'                     sstring1   tstring
sstring1   [^\']*                 sstring1   tstring
sstring1   \'                     shtmltag   tstring
sstring1   \'\'                   sstring1   tstring
sstring1   $                      shtmltag   tstring

shtmltag    \"                    sstring2   tstring
sstring2   [^\"]*                 sstring2   tstring
sstring2   \"                     shtmltag   tstring
sstring2   \"\"                   sstring2   tstring
sstring2   $                      shtmltag   tstring


//comments
shtmltag   <\!--                    scomment1 tcomment
scomment1 [^\-]*                   scomment1 tcomment
scomment1  -->                     shtmltag   tcomment

// reswords
shtmlVBS 'And'        shtmlVBS tresword
shtmlVBS 'As'         shtmlVBS tresword
shtmlVBS 'Attribute'  shtmlVBS tresword
shtmlVBS 'Base'       shtmlVBS tresword
shtmlVBS 'ByVal'      shtmlVBS tresword
shtmlVBS 'Call'       shtmlVBS tresword
shtmlVBS 'Case'       shtmlVBS tresword
shtmlVBS 'Compare'    shtmlVBS tresword
shtmlVBS 'Const'      shtmlVBS tresword
shtmlVBS 'Date'       shtmlVBS tresword
shtmlVBS 'Declare'    shtmlVBS tresword
shtmlVBS 'Dim'        shtmlVBS tresword
shtmlVBS 'Do'         shtmlVBS tresword
shtmlVBS 'Each'       shtmlVBS tresword
shtmlVBS 'Else'       shtmlVBS tresword
shtmlVBS 'Elseif'     shtmlVBS tresword
shtmlVBS 'Empty'      shtmlVBS tresword
shtmlVBS 'end'        shtmlVBS tresword
shtmlVBS 'Error'      shtmlVBS tresword
shtmlVBS 'Exit'       shtmlVBS tresword
shtmlVBS 'Explicit'   shtmlVBS tresword
shtmlVBS 'False'      shtmlVBS tresword
shtmlVBS 'For'        shtmlVBS tresword
shtmlVBS 'friend'     shtmlVBS tresword
shtmlVBS 'Function'   shtmlVBS tresword
shtmlVBS 'get'        shtmlVBS tresword
shtmlVBS 'If'         shtmlVBS tresword
shtmlVBS 'Is'         shtmlVBS tresword
shtmlVBS 'let'        shtmlVBS tresword
shtmlVBS 'Loop'       shtmlVBS tresword
shtmlVBS 'Mod'        shtmlVBS tresword
shtmlVBS 'Next'       shtmlVBS tresword
shtmlVBS 'Not'        shtmlVBS tresword
shtmlVBS 'Nothing'    shtmlVBS tresword
shtmlVBS 'Null'       shtmlVBS tresword
shtmlVBS 'On'         shtmlVBS tresword
shtmlVBS 'Option'     shtmlVBS tresword
shtmlVBS 'Or'         shtmlVBS tresword
shtmlVBS 'Private'    shtmlVBS tresword
shtmlVBS 'property'   shtmlVBS tresword
shtmlVBS 'Public'     shtmlVBS tresword
shtmlVBS 'ReDim'      shtmlVBS tresword
shtmlVBS 'Select'     shtmlVBS tresword
shtmlVBS 'Set'        shtmlVBS tresword
shtmlVBS 'String'     shtmlVBS tresword
shtmlVBS 'Sub'        shtmlVBS tresword
shtmlVBS 'Then'       shtmlVBS tresword
shtmlVBS 'To'         shtmlVBS tresword
shtmlVBS 'True'       shtmlVBS tresword
shtmlVBS 'Type'       shtmlVBS tresword
shtmlVBS 'Wend'       shtmlVBS tresword
shtmlVBS 'While'      shtmlVBS tresword
shtmlVBS 'With'       shtmlVBS tresword
shtmlVBS 'Xor'        shtmlVBS tresword

//idents
shtmlVBS   [a-z_A-Z][a-z_A-Z0-9]*  shtmlVBS   tident

// numbers
shtmlVBS [0-9][0-9]*              shtmlVBS  tinteger
shtmlVBS [1-9][0-9]*\.[0-9]*                    shtmlVBS  tfloat
shtmlVBS [1-9][0-9]*{\.[0-9]+}|e{[\+\-]}|[0-9]+ shtmlVBS   tfloat

//strings
shtmlVBS  \"                     sstring3   tstring
sstring3  [^\"]*                 sstring3   tstring
sstring3  \"                     shtmlVBS   tstring
sstring3  \"\"                   sstring3   tstring
sstring3  $                      shtmlVBS   tstring

//comments
shtmlVBS   \'                      scomment2  tcomment
scomment2  [#1-#255]*              shtmlVBS   tcomment
scomment2 $                        shtmlVBS   tcomment

shtmlVBS   rem[^#33-#255]          scomment3  tcomment
scomment3  [#1-#255]*              shtmlVBS   tcomment
scomment3 $                        shtmlVBS   tcomment

//VBS
snormal  <script#32language="vbscript">   shtmlVBS  tresword
shtmlVBS </script>                        snormal   tresword

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -