18 lines
403 B
Lua
18 lines
403 B
Lua
|
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
|