add visrc and lithaskell lexer
This commit is contained in:
parent
80ad92eb58
commit
d5c8feba9a
3 changed files with 50 additions and 0 deletions
18
config/vis/lexers/lithaskell.lua
Normal file
18
config/vis/lexers/lithaskell.lua
Normal file
|
@ -0,0 +1,18 @@
|
|||
local l = require('lexer')
|
||||
local token = l.token
|
||||
local S = lpeg.S
|
||||
|
||||
local M = {_NAME = 'lithaskell'}
|
||||
|
||||
local haskell = l.load('haskell')
|
||||
local start_rule = token(l.STYLE_EMBEDDED, l.starts_line(S('><')))
|
||||
local end_rule = token(l.STYLE_EMBEDDED, l.newline)
|
||||
|
||||
local line = token(l.COMMENT, l.nonnewline^1)
|
||||
M._rules = {
|
||||
{ 'comment', line }
|
||||
}
|
||||
|
||||
l.embed_lexer(M, haskell, start_rule, end_rule)
|
||||
|
||||
return M
|
Loading…
Add table
Add a link
Reference in a new issue