Verified Commit 0852232e authored by Camil Staps's avatar Camil Staps 🚀

v0.1.12: Add support for "derive class" syntax

parent e5b51ef3
......@@ -175,6 +175,7 @@ var highlightRules = {
[/((?:(?:definition|implementation|system)\s+)?module\b)/,
['keyword'], 'moduleName'],
[/(instance)(\s)/, ['keyword', 'whitespace'], 'instance'],
[/(derive)(\s+)(class)/, ['keyword', 'whitespace', 'keyword'], 'deriveClass'],
[/(derive)(\s)/, ['keyword', 'whitespace'], 'derive'],
[/(class)(\s)/, ['keyword', 'whitespace'], 'className'],
[/(::)/, ['punctuation'], 'typeDefName'],
......@@ -419,6 +420,9 @@ var highlightRules = {
derive: [
[/(\S+)/, ['generic'], 'jump:type'],
],
deriveClass: [
[/(\S+)/, ['classname'], 'jump:type'],
],
abc: [
[/(\.)/, ['abc-directive'], 'abcDirective'],
[/(\s+)/, ['whitespace'], 'abcInstruction'],
......
{
"name": "clean-highlighter",
"version": "0.1.11",
"version": "0.1.12",
"description": "Clean language highlighter",
"keywords": ["clean","highlighter"],
"main": "clean.js",
......
......@@ -2,6 +2,7 @@
derive ggen Int, Bool, Real, Char, String
derive ggen UNIT, PAIR, EITHER, CONS of gcd=:{a,b,c}, OBJECT of gtd, FIELD of d, RECORD of grd
derive ggen (,), (,,), (,,,), (,,,,), (,,,,,), (,,,,,,), (,,,,,,,)
derive class iTask TaskId, TaskListFilter, AttachmentStatus
-----
keyword derive
whitespace
......@@ -84,3 +85,17 @@ whitespace
punctuation (,,,,,,),
whitespace
punctuation (,,,,,,,)
whitespace \n
keyword derive
whitespace
keyword class
whitespace
classname iTask
whitespace
type TaskId
punctuation ,
whitespace
type TaskListFilter
punctuation ,
whitespace
type AttachmentStatus
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment