Skip to content

Commit 81920b6

Browse files
authoredDec 5, 2021
Hoon: Simplified the language definition a little (#3212)
1 parent 3d41067 commit 81920b6

File tree

2 files changed

+4
-9
lines changed

2 files changed

+4
-9
lines changed
 

‎components/prism-hoon.js

+3-8
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,14 @@
11
Prism.languages.hoon = {
2-
'constant': /%(?:\.[ny]|[\w-]+)/,
32
'comment': {
43
pattern: /::.*/,
54
greedy: true
65
},
7-
'class-name': [
8-
{
9-
pattern: /@(?:[A-Za-z0-9-]*[A-Za-z0-9])?/
10-
},
11-
/\*/
12-
],
13-
'function': /(?:\+[-+] {2})?(?:[a-z](?:[a-z0-9-]*[a-z0-9])?)/,
146
'string': {
157
pattern: /"[^"]*"|'[^']*'/,
168
greedy: true
179
},
10+
'constant': /%(?:\.[ny]|[\w-]+)/,
11+
'class-name': /@(?:[a-z0-9-]*[a-z0-9])?|\*/i,
12+
'function': /(?:\+[-+] {2})?(?:[a-z](?:[a-z0-9-]*[a-z0-9])?)/,
1813
'keyword': /\.[\^\+\*=\?]|![><:\.=\?!]|=[>|:,\.\-\^<+;/~\*\?]|\?[>|:\.\-\^<\+&~=@!]|\|[\$_%:\.\-\^~\*=@\?]|\+[|\$\+\*]|:[_\-\^\+~\*]|%[_:\.\-\^\+~\*=]|\^[|:\.\-\+&~\*=\?]|\$[|_%:<>\-\^&~@=\?]|;[:<\+;\/~\*=]|~[>|\$_%<\+\/&=\?!]|--|==/
1914
};

‎components/prism-hoon.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)
Please sign in to comment.