aboutsummaryrefslogtreecommitdiff
path: root/node_modules/highlight.js/lib/languages/sml.js
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2017-05-24 15:10:37 +0200
committerFlorian Dold <florian.dold@gmail.com>2017-05-24 15:11:17 +0200
commit7a3df06eb573d36142bd1a8e03c5ce8752d300b3 (patch)
tree70bfaea8884c374876f607774850a3a51c0cb381 /node_modules/highlight.js/lib/languages/sml.js
parentaca1143cb9eed16cf37f04e475e4257418dd18ac (diff)
downloadwallet-core-7a3df06eb573d36142bd1a8e03c5ce8752d300b3.tar.xz
fix build issues and add typedoc
Diffstat (limited to 'node_modules/highlight.js/lib/languages/sml.js')
-rw-r--r--node_modules/highlight.js/lib/languages/sml.js65
1 files changed, 65 insertions, 0 deletions
diff --git a/node_modules/highlight.js/lib/languages/sml.js b/node_modules/highlight.js/lib/languages/sml.js
new file mode 100644
index 000000000..e7a34ce5e
--- /dev/null
+++ b/node_modules/highlight.js/lib/languages/sml.js
@@ -0,0 +1,65 @@
+module.exports = function(hljs) {
+ return {
+ aliases: ['ml'],
+ keywords: {
+ keyword:
+ /* according to Definition of Standard ML 97 */
+ 'abstype and andalso as case datatype do else end eqtype ' +
+ 'exception fn fun functor handle if in include infix infixr ' +
+ 'let local nonfix of op open orelse raise rec sharing sig ' +
+ 'signature struct structure then type val with withtype where while',
+ built_in:
+ /* built-in types according to basis library */
+ 'array bool char exn int list option order real ref string substring vector unit word',
+ literal:
+ 'true false NONE SOME LESS EQUAL GREATER nil'
+ },
+ illegal: /\/\/|>>/,
+ lexemes: '[a-z_]\\w*!?',
+ contains: [
+ {
+ className: 'literal',
+ begin: /\[(\|\|)?\]|\(\)/,
+ relevance: 0
+ },
+ hljs.COMMENT(
+ '\\(\\*',
+ '\\*\\)',
+ {
+ contains: ['self']
+ }
+ ),
+ { /* type variable */
+ className: 'symbol',
+ begin: '\'[A-Za-z_](?!\')[\\w\']*'
+ /* the grammar is ambiguous on how 'a'b should be interpreted but not the compiler */
+ },
+ { /* polymorphic variant */
+ className: 'type',
+ begin: '`[A-Z][\\w\']*'
+ },
+ { /* module or constructor */
+ className: 'type',
+ begin: '\\b[A-Z][\\w\']*',
+ relevance: 0
+ },
+ { /* don't color identifiers, but safely catch all identifiers with '*/
+ begin: '[a-z_]\\w*\'[\\w\']*'
+ },
+ hljs.inherit(hljs.APOS_STRING_MODE, {className: 'string', relevance: 0}),
+ hljs.inherit(hljs.QUOTE_STRING_MODE, {illegal: null}),
+ {
+ className: 'number',
+ begin:
+ '\\b(0[xX][a-fA-F0-9_]+[Lln]?|' +
+ '0[oO][0-7_]+[Lln]?|' +
+ '0[bB][01_]+[Lln]?|' +
+ '[0-9][0-9_]*([Lln]|(\\.[0-9_]*)?([eE][-+]?[0-9_]+)?)?)',
+ relevance: 0
+ },
+ {
+ begin: /[-=]>/ // relevance booster
+ }
+ ]
+ };
+}; \ No newline at end of file