mirror of
https://github.com/Funkoala14/knowledgebase_law.git
synced 2025-06-09 00:28:15 +08:00
23 lines
667 B
JavaScript
23 lines
667 B
JavaScript
|
'use strict'
|
||
|
|
||
|
module.exports = hoon
|
||
|
hoon.displayName = 'hoon'
|
||
|
hoon.aliases = []
|
||
|
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:
|
||
|
/\.[\^\+\*=\?]|![><:\.=\?!]|=[>|:,\.\-\^<+;/~\*\?]|\?[>|:\.\-\^<\+&~=@!]|\|[\$_%:\.\-\^~\*=@\?]|\+[|\$\+\*]|:[_\-\^\+~\*]|%[_:\.\-\^\+~\*=]|\^[|:\.\-\+&~\*=\?]|\$[|_%:<>\-\^&~@=\?]|;[:<\+;\/~\*=]|~[>|\$_%<\+\/&=\?!]|--|==/
|
||
|
}
|
||
|
}
|