Skip to content

Commit

Permalink
Hoon: Simplified the language definition a little (#3212)
Browse files Browse the repository at this point in the history
  • Loading branch information
RunDevelopment committed Dec 5, 2021
1 parent 3d41067 commit 81920b6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
11 changes: 3 additions & 8 deletions components/prism-hoon.js
@@ -1,19 +1,14 @@
Prism.languages.hoon = {
'constant': /%(?:\.[ny]|[\w-]+)/,
'comment': {
pattern: /::.*/,
greedy: true
},
'class-name': [
{
pattern: /@(?:[A-Za-z0-9-]*[A-Za-z0-9])?/
},
/\*/
],
'function': /(?:\+[-+] {2})?(?:[a-z](?:[a-z0-9-]*[a-z0-9])?)/,
'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': /\.[\^\+\*=\?]|![><:\.=\?!]|=[>|:,\.\-\^<+;/~\*\?]|\?[>|:\.\-\^<\+&~=@!]|\|[\$_%:\.\-\^~\*=@\?]|\+[|\$\+\*]|:[_\-\^\+~\*]|%[_:\.\-\^\+~\*=]|\^[|:\.\-\+&~\*=\?]|\$[|_%:<>\-\^&~@=\?]|;[:<\+;\/~\*=]|~[>|\$_%<\+\/&=\?!]|--|==/
};
2 changes: 1 addition & 1 deletion components/prism-hoon.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 81920b6

Please sign in to comment.