Skip to content

Commit

Permalink
Added Qore language support
Browse files Browse the repository at this point in the history
  • Loading branch information
temnoregg committed Dec 31, 2014
1 parent d6b2aa0 commit c38007c
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
20 changes: 20 additions & 0 deletions components/prism-qore.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Prism.languages.qore = Prism.languages.extend('clike', {
'comment': {
pattern: /(^|[^\\])(\/\*[\w\W]*?\*\/|((\/\/)|#).*?(\r?\n|$))/g, // /(^|[^\\])([\w\W]*?\*\/|(^|[^:])\/\/.*?(\r?\n|$))/g,
lookbehind: true
},
'variable': /(\$\w+)\b/ig,
'keyword': /\b(abstract|any|assert|binary|bool|boolean|break|byte|case|catch|char|class|code|const|continue|data|default|do|double|else|enum|extends|final|finally|float|for|goto|hash|if|implements|import|inherits|instanceof|int|interface|long|my|native|new|nothing|null|object|our|own|private|reference|rethrow|return|short|softint|softfloat|softnumber|softbool|softstring|softdate|softlist|static|strictfp|string|sub|super|switch|synchronized|this|throw|throws|transient|try|void|volatile|while)\b/g,
'number': /\b0b[01]+\b|\b0x[\da-f]*\.?[\da-fp\-]+\b|\b\d*\.?\d+[e]?[\d]*[df]\b|\W\d*\.?\d+\b/gi,
'boolean': /\b(true|false)\b/ig,
'operator': {
pattern: /([^\.]|^)([-+]{1,2}|!|=?<|=?>|={1,2}|(&){1,2}|\|?\||\?|\*|\/|%|\^|(<){2}|($gt;){2,3}|:|~|new|background|dlete|remove|cast|shift|pop|chomp|trim|elements|keys|exists|instanceof|unshift|push|splice|extract|map|foldl|foldr|select|\$)/g,
lookbehind: true
},
'function': {
pattern: /[a-z0-9_]+\(/ig,
inside: {
punctuation: /\(/
}
},
});
1 change: 1 addition & 0 deletions components/prism-qore.min.js

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

0 comments on commit c38007c

Please sign in to comment.