~martanne/devel

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
6 4

[PATCH vis 1/3] Added 'done' literal to Hare lexer.

Details
Message ID
<20240618095314.26043-1-mcepl@cepl.eu>
DKIM signature
pass
Download raw message
Patch: +1 -1
From: mitchell <70453897+orbitalquark@users.noreply.github.com>

---
 lua/lexers/hare.lua | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lua/lexers/hare.lua b/lua/lexers/hare.lua
index fcf6e6a9..24f53758 100644
--- a/lua/lexers/hare.lua
+++ b/lua/lexers/hare.lua
@@ -74,7 +74,7 @@ lex:set_word_list(lexer.FUNCTION_BUILTIN, {
  'vaarg', 'vaend', 'vastart'
})

lex:set_word_list(lexer.CONSTANT_BUILTIN, 'false null true void')
lex:set_word_list(lexer.CONSTANT_BUILTIN, 'done false null true void')

lexer.property['scintillua.comment'] = '//'

-- 
2.45.2

[PATCH vis 2/3] Initialize fold constants when Scintillua is used as a standalone library.

Details
Message ID
<20240618095314.26043-2-mcepl@cepl.eu>
In-Reply-To
<20240618095314.26043-1-mcepl@cepl.eu> (view parent)
DKIM signature
pass
Download raw message
Patch: +5 -4
From: mitchell <70453897+orbitalquark@users.noreply.github.com>

---
 lua/lexers/lexer.lua | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/lua/lexers/lexer.lua b/lua/lexers/lexer.lua
index f860d668..12a1404f 100644
--- a/lua/lexers/lexer.lua
+++ b/lua/lexers/lexer.lua
@@ -1269,8 +1269,7 @@ function M.fold(lexer, text, start_line, start_level)
  local folds = {}
  if text == '' then return folds end
  local fold = M.property_int['fold'] > 0
  local FOLD_BASE = M.FOLD_BASE or 0x400
  local FOLD_HEADER, FOLD_BLANK = M.FOLD_HEADER or 0x2000, M.FOLD_BLANK or 0x1000
  local FOLD_BASE, FOLD_HEADER, FOLD_BLANK = M.FOLD_BASE, M.FOLD_HEADER, M.FOLD_BLANK
  if M._standalone then M._text, M.line_state = text, {} end
  if fold and lexer._fold_points then
    local lines = {}
@@ -1443,8 +1442,8 @@ function M.new(name, opts)
  return lexer
end

--- Creates a substitute for some Scintilla tables and functions that Scintillua depends on
--- when using it as a standalone module.
--- Creates a substitute for some Scintilla tables, functions, and fields that Scintillua
-- depends on when using it as a standalone module.
local function initialize_standalone_library()
  M.property = setmetatable({['scintillua.lexers'] = package.path:gsub('/%?%.lua', '/lexers')}, {
    __index = function() return '' end, __newindex = function(t, k, v) rawset(t, k, tostring(v)) end
@@ -1471,6 +1470,8 @@ local function initialize_standalone_library()
    end
  })

  M.FOLD_BASE, M.FOLD_HEADER, M.FOLD_BLANK = 0x400, 0x2000, 0x1000

  M._standalone = true
end

-- 
2.45.2

[PATCH vis 3/3] fix: remove duplicate and obsolete lexer vbscript.lua

Details
Message ID
<20240618095314.26043-3-mcepl@cepl.eu>
In-Reply-To
<20240618095314.26043-1-mcepl@cepl.eu> (view parent)
DKIM signature
pass
Download raw message
Patch: +0 -63
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>
---
 lua/lexers/vbscript.lua | 63 -----------------------------------------
 1 file changed, 63 deletions(-)
 delete mode 100644 lua/lexers/vbscript.lua

diff --git a/lua/lexers/vbscript.lua b/lua/lexers/vbscript.lua
deleted file mode 100644
index 69e3dca4..00000000
--- a/lua/lexers/vbscript.lua
@@ -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
-- 
2.45.2

[vis/patches] build success

builds.sr.ht <builds@sr.ht>
Details
Message ID
<D231WAR0H1QS.3TL3EYK82P3KJ@fra02>
In-Reply-To
<20240618095314.26043-3-mcepl@cepl.eu> (view parent)
DKIM signature
missing
Download raw message
vis/patches: SUCCESS in 1m28s

[Added 'done' literal to Hare lexer.][0] from [Matěj Cepl][1]

[0]: https://lists.sr.ht/~martanne/devel/patches/53359
[1]: mcepl@cepl.eu

✓ #1253871 SUCCESS vis/patches/alpine.yml  https://builds.sr.ht/~martanne/job/1253871
✓ #1253874 SUCCESS vis/patches/openbsd.yml https://builds.sr.ht/~martanne/job/1253874
✓ #1253873 SUCCESS vis/patches/freebsd.yml https://builds.sr.ht/~martanne/job/1253873
✓ #1253872 SUCCESS vis/patches/debian.yml  https://builds.sr.ht/~martanne/job/1253872

Re: [vis/patches] build success

Details
Message ID
<2DOCBA4IXV22W.2SFZM5HJ8DFLQ@rnpnr.xyz>
In-Reply-To
<D231WAR0H1QS.3TL3EYK82P3KJ@fra02> (view parent)
DKIM signature
permerror
Download raw message
"builds.sr.ht" <builds@sr.ht> wrote:
> vis/patches: SUCCESS in 1m28s
> 
> [Added 'done' literal to Hare lexer.][0] from [Matěj Cepl][1]
> 
> [0]: https://lists.sr.ht/~martanne/devel/patches/53359
> [1]: mcepl@cepl.eu
> 
> ✓ #1253871 SUCCESS vis/patches/alpine.yml  https://builds.sr.ht/~martanne/job/1253871
> ✓ #1253874 SUCCESS vis/patches/openbsd.yml https://builds.sr.ht/~martanne/job/1253874
> ✓ #1253873 SUCCESS vis/patches/freebsd.yml https://builds.sr.ht/~martanne/job/1253873
> ✓ #1253872 SUCCESS vis/patches/debian.yml  https://builds.sr.ht/~martanne/job/1253872

This is fine but I will probably squash all three together with any
resolution to "html syntax highlight misses on single tags" [0].

[0]: https://github.com/orbitalquark/scintillua/issues/114 

- Randy

-- 
https://rnpnr.xyz/
GPG Fingerprint: B8F0 CF4C B6E9 415C 1B27 A8C4 C8D2 F782 86DF 2DC5

Re: [PATCH vis 3/3] fix: remove duplicate and obsolete lexer vbscript.lua

Matěj Cepl <mcepl@suse.cz>
Details
Message ID
<D2TWRBB7K2BK.1IG7VMD4FDZH7@suse.cz>
In-Reply-To
<20240618095314.26043-3-mcepl@cepl.eu> (view parent)
DKIM signature
pass
Download raw message
Ping? It seems to me that https://github.com/martanne/vis/pull/1197 is
mostly done.

Best,

Matěj

-- 
http://matej.ceplovi.cz/blog/, @mcepl@floss.social
GPG Finger: 3C76 A027 CA45 AD70 98B5  BC1D 7920 5802 880B C9D8
 
The Schleswig-Holstein question is so complicated, only three men
in Europe have ever understood it. One was Prince Albert, who is
dead. The second was a German professor who became mad. I am the
third and I have forgotten all about it.
  -- Lord Palmerston

Re: [PATCH vis 3/3] fix: remove duplicate and obsolete lexer vbscript.lua

Details
Message ID
<3DAHH5S0ABH4J.2ERVCFH9V3OC6@rnpnr.xyz>
In-Reply-To
<D2TWRBB7K2BK.1IG7VMD4FDZH7@suse.cz> (view parent)
DKIM signature
permerror
Download raw message
Matěj Cepl <mcepl@suse.cz> wrote:
> Ping? It seems to me that https://github.com/martanne/vis/pull/1197 is
> mostly done.
> 
> Best,
> 
> Matěj

Sorry for the delay! Applied after squashing the first two.

-- 
https://rnpnr.xyz/
GPG Fingerprint: B8F0 CF4C B6E9 415C 1B27 A8C4 C8D2 F782 86DF 2DC5
Reply to thread Export thread (mbox)