-
-
Notifications
You must be signed in to change notification settings - Fork 42
/
Copy pathhoon.js
25 lines (24 loc) · 767 Bytes
/
hoon.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// @ts-nocheck
/**
* @import {Refractor} from '../lib/core.js'
*/
hoon.displayName = 'hoon'
hoon.aliases = []
/** @param {Refractor} Prism */
export default function hoon(Prism) {
Prism.languages.hoon = {
comment: {
pattern: /::.*/,
greedy: true
},
string: {
pattern: /"(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*'/,
greedy: true
},
constant: /%(?:\.[ny]|[\w-]+)/,
'class-name': /@(?:[a-z0-9-]*[a-z0-9])?|\*/i,
function: /(?:\+[-+] {2})?(?:[a-z](?:[a-z0-9-]*[a-z0-9])?)/,
keyword:
/\.[\^\+\*=\?]|![><:\.=\?!]|=[>|:,\.\-\^<+;/~\*\?]|\?[>|:\.\-\^<\+&~=@!]|\|[\$_%:\.\-\^~\*=@\?]|\+[|\$\+\*]|:[_\-\^\+~\*]|%[_:\.\-\^\+~\*=]|\^[|:\.\-\+&~\*=\?]|\$[|_%:<>\-\^&~@=\?]|;[:<\+;\/~\*=]|~[>|\$_%<\+\/&=\?!]|--|==/
}
}