aboutsummaryrefslogtreecommitdiff
path: root/lua
diff options
context:
space:
mode:
authorMatěj Cepl <mcepl@cepl.eu>2024-06-18 11:52:56 +0200
committerRandy Palamar <randy@rnpnr.xyz>2024-07-26 05:50:42 -0600
commit2d87fdc0d088b12571b0c695549106b766585a92 (patch)
tree8cfaeb02c24410febfadd7abd62176bc2435ad76 /lua
parent8e9c76550bafd7c573b1da91214439c7d5e0b4c9 (diff)
downloadvis-2d87fdc0d088b12571b0c695549106b766585a92.tar.gz
vis-2d87fdc0d088b12571b0c695549106b766585a92.tar.xz
remove duplicate and obsolete lexer vbscript.lua
Relates-to: https://github.com/orbitalquark/scintillua/issues/68 Relates-to: https://github.com/orbitalquark/scintillua/commit/dee7d765a005 Signed-off-by: Matěj Cepl <mcepl@cepl.eu>
Diffstat (limited to 'lua')
-rw-r--r--lua/lexers/vbscript.lua63
1 files changed, 0 insertions, 63 deletions
diff --git a/lua/lexers/vbscript.lua b/lua/lexers/vbscript.lua
deleted file mode 100644
index 69e3dca..0000000
--- a/lua/lexers/vbscript.lua
+++ /dev/null
@@ -1,63 +0,0 @@
--- Copyright 2006-2017 Mitchell mitchell.att.foicica.com. See LICENSE.
--- VisualBasic LPeg lexer.
-
-local l = require('lexer')
-local token, word_match = l.token, l.word_match
-local P, R, S = lpeg.P, lpeg.R, lpeg.S
-
-local M = {_NAME = 'vbscript'}
-
--- Whitespace.
-local ws = token(l.WHITESPACE, l.space^1)
-
--- Comments.
-local comment = token(l.COMMENT, (P("'") + word_match({'rem'}, nil, true)) * l.nonnewline^0)
-
--- Strings.
-local string = token(l.STRING, l.range('"', true, true))
-
--- Numbers.
-local number = token(l.NUMBER, (l.float + l.integer) * S('LlUuFf')^-2)
-
--- Keywords.
-local keyword = token(l.KEYWORD, word_match({
- -- Control.
- 'If', 'Then', 'Else', 'ElseIf', 'While', 'Wend', 'For', 'To', 'Each',
- 'In', 'Step', 'Case', 'Select', 'Return', 'Continue', 'Do',
- 'Until', 'Loop', 'Next', 'With', 'Exit',
- -- Operators.
- 'Mod', 'And', 'Not', 'Or', 'Xor', 'Is',
- -- Storage types.
- 'Call', 'Class', 'Const', 'Dim', 'ReDim', 'Preserve', 'Function', 'Sub',
- 'Property', 'End', 'Set', 'Let', 'Get', 'New', 'Randomize', 'Option',
- 'Explicit', 'On', 'Error', 'Execute',
- -- Storage modifiers.
- 'Private', 'Public', 'Default',
- -- Constants.
- 'Empty', 'False', 'Nothing', 'Null', 'True'
-}, nil, true))
-
--- Types.
-local type = token(l.TYPE, word_match({
- 'Boolean', 'Byte', 'Char', 'Date', 'Decimal', 'Double', 'Long', 'Object',
- 'Short', 'Single', 'String'
-}, nil, true))
-
--- Identifiers.
-local identifier = token(l.IDENTIFIER, l.word)
-
--- Operators.
-local operator = token(l.OPERATOR, S('=><+-*^&:.,_()'))
-
-M._rules = {
- {'whitespace', ws},
- {'keyword', keyword},
- {'type', type},
- {'comment', comment},
- {'identifier', identifier},
- {'string', string},
- {'number', number},
- {'operator', operator},
-}
-
-return M