main
Last change
on this file since d24f17c was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago |
Initial commit
|
-
Property mode
set to
100644
|
File size:
1.3 KB
|
Rev | Line | |
---|
[d24f17c] | 1 | 'use strict'
|
---|
| 2 |
|
---|
| 3 | module.exports = dataweave
|
---|
| 4 | dataweave.displayName = 'dataweave'
|
---|
| 5 | dataweave.aliases = []
|
---|
| 6 | function dataweave(Prism) {
|
---|
| 7 | ;(function (Prism) {
|
---|
| 8 | Prism.languages.dataweave = {
|
---|
| 9 | url: /\b[A-Za-z]+:\/\/[\w/:.?=&-]+|\burn:[\w:.?=&-]+/,
|
---|
| 10 | property: {
|
---|
| 11 | pattern: /(?:\b\w+#)?(?:"(?:\\.|[^\\"\r\n])*"|\b\w+)(?=\s*[:@])/,
|
---|
| 12 | greedy: true
|
---|
| 13 | },
|
---|
| 14 | string: {
|
---|
| 15 | pattern: /(["'`])(?:\\[\s\S]|(?!\1)[^\\])*\1/,
|
---|
| 16 | greedy: true
|
---|
| 17 | },
|
---|
| 18 | 'mime-type':
|
---|
| 19 | /\b(?:application|audio|image|multipart|text|video)\/[\w+-]+/,
|
---|
| 20 | date: {
|
---|
| 21 | pattern: /\|[\w:+-]+\|/,
|
---|
| 22 | greedy: true
|
---|
| 23 | },
|
---|
| 24 | comment: [
|
---|
| 25 | {
|
---|
| 26 | pattern: /(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,
|
---|
| 27 | lookbehind: true,
|
---|
| 28 | greedy: true
|
---|
| 29 | },
|
---|
| 30 | {
|
---|
| 31 | pattern: /(^|[^\\:])\/\/.*/,
|
---|
| 32 | lookbehind: true,
|
---|
| 33 | greedy: true
|
---|
| 34 | }
|
---|
| 35 | ],
|
---|
| 36 | regex: {
|
---|
| 37 | pattern: /\/(?:[^\\\/\r\n]|\\[^\r\n])+\//,
|
---|
| 38 | greedy: true
|
---|
| 39 | },
|
---|
| 40 | keyword:
|
---|
| 41 | /\b(?:and|as|at|case|do|else|fun|if|input|is|match|not|ns|null|or|output|type|unless|update|using|var)\b/,
|
---|
| 42 | function: /\b[A-Z_]\w*(?=\s*\()/i,
|
---|
| 43 | number: /-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,
|
---|
| 44 | punctuation: /[{}[\];(),.:@]/,
|
---|
| 45 | operator: /<<|>>|->|[<>~=]=?|!=|--?-?|\+\+?|!|\?/,
|
---|
| 46 | boolean: /\b(?:false|true)\b/
|
---|
| 47 | }
|
---|
| 48 | })(Prism)
|
---|
| 49 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.