{"name":"Visual Basic for Applications","scopeName":"source.vba","patterns":[{"include":"#comments"},{"include":"#keywords"},{"include":"#numbers"},{"include":"#storage"},{"include":"#strings"},{"include":"#types"},{"include":"#functions"},{"name":"constant.other.vba","match":"_(?=\\s*\\n)"}],"repository":{"comments":{"begin":"(?=')|(?:^(?:|(\\d*)\\s*|[a-zA-Z][a-zA-Z0-9]{0,254}:\\s*)|:\\s*)(?=(?i:Rem ))","end":"(?\u003c!\\s_)$\n","patterns":[{"name":"comment.line.quote","match":"'.*"},{"name":"comment.line.rem","match":"Rem .*"},{"name":"comment.line.continuation","match":"^.*"}],"beginCaptures":{"1":{"name":"constant.numeric.decimal"}}},"functions":{"name":"entity.name.function.vba","match":"(?i:\\b(?:(?\u003c=Call )|(?\u003c=Function )|(?\u003c=Sub ))[a-zA-Z][a-zA-Z0-9_]*\\b)(?=\\(\\)?)"},"keywords":{"patterns":[{"name":"keyword.other.option.vba","match":"(?i)\\bOption (Base [01]|Compare (Binary|Text)|Explicit|Private Module)\\b"},{"name":"keyword.conditional.vba","match":"(?i:\\b(Do(( While)|( Until))?|While|Case( Else)?|Else(If)?|For( Each)?|(I)?If|In|New|(Select )?Case|Then|To|Step|With)\\b)"},{"name":"keyword.conditional.end.vba","match":"(?i:\\b(End( )?If|End (Select|With)|Next|Wend|Loop(( While)|( Until))?|Exit (For|Do|While))\\b)"},{"name":"keyword.control.vba","match":"(?i:(\\b(Exit (Function|Property|Sub)|As|And|By(Ref|Val)|Goto|Is|Like|Mod|Not|On Error|Optional|Or|Resume Next|Stop|Xor|Eqv|Imp|TypeOf|AddressOf)\\b)|(\\b(End)\\b(?=\\n)))"},{"name":"keyword.other.vba","match":"(?i:\\b(Attribute|Call|End (Function|Property|Sub|Type|Enum)|(Const|Function|Property|Sub|Type|Enum)|Declare|PtrSafe|WithEvents|Event|RaiseEvent)\\b)"},{"name":"keyword.other.visibility.vba","match":"(?i:\\b(Private|Public|Friend)\\b)"},{"name":"constant.language.vba","match":"(?i)\\b(Empty|False|Nothing|Null|True)\\b"}]},"numbers":{"patterns":[{"name":"constant.numeric.date","match":"(?i)#((Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)|[0-9]{1,2})(-|/)[0-9]{1,2}((-|/)[0-9]{1,4})?#"},{"name":"constant.numeric.decimal","match":"(?\u003c!\\w)-?\\d+(\\.\\d+)?"},{"name":"constant.numeric.octal","match":"(?i)-?\u0026O[0-7]+"},{"name":"constant.numeric.hexadecimal","match":"(?i)-?\u0026H[0-9A-F]+"}]},"storage":{"patterns":[{"name":"storage.modifier.vba","match":"(?i)\\b(Class|Const|Dim|(G|L|S)et|ReDim( Preserve)?|Erase|Static)\\b"}]},"strings":{"name":"string.quoted.double","begin":"\"","end":"\""},"types":{"patterns":[{"name":"support.type.builtin.vba","match":"(?i)\\b(Any|Byte|Boolean|Currency|Collection|Date|Double|Integer|Long(Long|Ptr)?|Object|Single|String|Variant)\\b"},{"match":"(?i)(?\u003c= As )([a-zA-Z][a-zA-Z0-9_]*)","captures":{"1":{"name":"support.type"}}}]}}}
