Commit bd0f18ed authored by Camil Staps's avatar Camil Staps

Add rules for backticks (fixes clean-cloogle/cloogle.org#200)

parent 220f0149
......@@ -467,8 +467,8 @@ var highlightRules = {
],
typeDefSynonym: [
[/([a-z][a-zA-Z]*)/, ['typevar']],
[/([A-Z_]\w*)/, ['type']],
[/([^\w\s])/, ['punctuation']]
[/([A-Z_][\w`]*)/, ['type']],
[/([^\w`\s])/, ['punctuation']]
],
typeDefRhs: [
[/(\s*)(E)(\.)/, ['whitespace', 'existential', 'punctuation'], 'jump:typeDefRhsExi'],
......@@ -485,16 +485,16 @@ var highlightRules = {
[/(\})/, ['punctuation']]
],
typeDefFieldType: [
[/([a-z]\w*)/, ['typevar']],
[/([A-Z_]\w*)/, ['type']],
[/([a-z][\w`]*)/, ['typevar']],
[/([A-Z_][\w`]*)/, ['type']],
[/(\()/, ['punctuation'], 'typeDefTuple'],
[/([\[\{])/, ['punctuation'], 'typeDefFieldType'],
[/([\]\},])/, ['punctuation'], 'pop'],
[/([^\w\s])/, ['punctuation']]
],
typeDefTuple: [
[/([a-z]\w*)/, ['typevar']],
[/([A-Z_]\w*)/, ['type']],
[/([a-z][\w`]*)/, ['typevar']],
[/([A-Z_][\w`]*)/, ['type']],
[/([\(\[\{])/, ['punctuation'], 'typeDefTuple'],
[/([\)\]\}])/, ['punctuation'], 'pop'],
[/([^\w\s])/, ['punctuation']]
......@@ -512,7 +512,7 @@ var highlightRules = {
['keyword', 'whitespace', 'keyword', 'whitespace']],
[/([a-z][\w`]*)/, ['typevar']],
[/(A)(\.)/, ['existential', 'punctuation'], 'quantifiedVariables'],
[/([A-Z]\w*)/, ['type']],
[/([A-Z][\w`]*)/, ['type']],
[/(\|)/, ['punctuation'], 'pop'],
[/(&)/, ['punctuation'], 'jump:typeDefContext'],
[/([^\w\s])/, ['punctuation']]
......
{
"name": "clean-highlighter",
"version": "0.1.7",
"version": "0.1.8",
"description": "Clean language highlighter",
"keywords": ["clean","highlighter"],
"main": "clean.js",
......
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