Verified Commit b5ae9496 authored by Camil Staps's avatar Camil Staps 🚀

v0.1.2: Support infix macros

parent 88ff4d98
......@@ -208,6 +208,9 @@ function highlightClean(func, callback, start) {
'keyword', 'whitespace', 'keyword', 'whitespace',
'punctuation']
, 'type'],
[/(\()(\S+)(\))(\s+)(infix[rl]?)(\s*)(\d*)/,
['punctuation', 'funcname', 'punctuation', 'whitespace',
'keyword', 'whitespace', 'keyword']],
[/(\()(\S+)(\))/,['punctuation', 'funcname', 'punctuation'], 'funcargs'],
[/(infix[rl]?)(\s+)(\d*)/,
['keyword', 'whitespace', 'keyword']],
......@@ -561,7 +564,7 @@ function highlightClean(func, callback, start) {
],
importAs: [
[/(,)/, ['punctuation'], 'pop'],
[/([^,\s]+)/, ['modulename qualified']]
[/([^,\s]+)/, ['qualified']]
],
importFrom: [
[/([^,\s]+)(\s+)(import)/, ['modulename', 'whitespace', 'keyword'], 'importSelections']
......
{
"name": "clean.js",
"version": "0.1.1",
"version": "0.1.2",
"description": "Clean language highlighter",
"main": "clean.js",
"dependencies": {},
......
-----
(as) infix 0
(as) p n :== name n p
-----
punctuation (
funcname as
punctuation )
whitespace
keyword infix
whitespace
keyword 0
whitespace \n
punctuation (
funcname as
punctuation )
whitespace
argument p
whitespace
argument n
whitespace
punctuation :==
whitespace
funcname funcname-onlyused name
whitespace
argumentinrhs n
whitespace
argumentinrhs p
......@@ -220,7 +220,7 @@ modulename Data.Map
whitespace
keyword as
whitespace
modulename modulename-onlyused M
qualified M
whitespace \n
keyword import
whitespace
......@@ -250,7 +250,7 @@ modulename Data.Set
whitespace
keyword as
whitespace
modulename modulename-onlyused S
qualified S
whitespace \n
keyword import
whitespace
......@@ -296,7 +296,7 @@ modulename Database.Native
whitespace
keyword as
whitespace
modulename modulename-onlyused DB
qualified DB
whitespace \n
keyword import
whitespace
......@@ -772,7 +772,7 @@ modulename Clean.Types
whitespace
keyword as
whitespace
modulename modulename-onlyused T
qualified T
whitespace \n
keyword from
whitespace
......@@ -813,7 +813,7 @@ modulename Clean.Types.Unify
whitespace
keyword as
whitespace
modulename modulename-onlyused TU
qualified TU
whitespace \n
keyword from
whitespace
......@@ -999,7 +999,7 @@ modulename Cloogle.DB
whitespace
keyword as
whitespace
modulename modulename-onlyused CDB
qualified CDB
whitespace \n
keyword from
whitespace
......
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