Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(45)

Side by Side Diff: lib/src/prism/components/prism-q.js

Issue 1418513006: update elements and fix some bugs (Closed) Base URL: git@github.com:dart-lang/polymer_elements.git@master
Patch Set: code review updates Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « lib/src/prism/components/prism-python.min.js ('k') | lib/src/prism/components/prism-q.min.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 Prism.languages.q = {
2 'string': /"(?:\\.|[^"\\\r\n])*"/,
3 'comment': [
4 // From http://code.kx.com/wiki/Reference/Slash:
5 // When / is following a space (or a right parenthesis, bracket, or brace), it is ignored with the rest of the line.
6 {
7
8 pattern: /([\t )\]}])\/.*/,
9 lookbehind: true
10 },
11 // From http://code.kx.com/wiki/Reference/Slash:
12 // A line which has / as its first character and contains at lea st one other non-whitespace character is a whole-line comment and is ignored ent irely.
13 // A / on a line by itself begins a multiline comment which is t erminated by the next \ on a line by itself.
14 // If a / is not matched by a \, the multiline comment is unterm inated and continues to end of file.
15 // The / and \ must be the first char on the line, but may be fo llowed by any amount of whitespace.
16 {
17 pattern: /(^|\r?\n|\r)\/[\t ]*(?:(?:\r?\n|\r)(?:.*(?:\r? \n|\r))*?(?:\\(?=[\t ]*(?:\r?\n|\r))|$)|\S.*)/,
18 lookbehind: true
19 },
20 // From http://code.kx.com/wiki/Reference/Slash:
21 // A \ on a line by itself with no preceding matching / will com ment to end of file.
22 /^\\[\t ]*(?:\r?\n|\r)[\s\S]+/m,
23
24 /^#!.+/m
25 ],
26 'symbol': /`(?::\S+|[\w.]*)/,
27 'datetime': {
28 pattern: /0N[mdzuvt]|0W[dtz]|\d{4}\.\d\d(?:m|\.\d\d(?:T(?:\d\d(? ::\d\d(?::\d\d(?:[.:]\d\d\d)?)?)?)?)?[dz]?)|\d\d:\d\d(?::\d\d(?:[.:]\d\d\d)?)?[u vt]?/,
29 alias: 'number'
30 },
31 // The negative look-ahead prevents bad highlighting
32 // of verbs 0: and 1:
33 'number': /\b-?(?![01]:)(?:0[wn]|0W[hj]?|0N[hje]?|0x[\da-fA-F]+|\d+\.?\d *(?:e[+-]?\d+)?[hjfeb]?)/,
34 'keyword': /\\\w+\b|\b(?:abs|acos|aj0?|all|and|any|asc|asin|asof|atan|at tr|avgs?|binr?|by|ceiling|cols|cor|cos|count|cov|cross|csv|cut|delete|deltas|des c|dev|differ|distinct|div|do|dsave|ej|enlist|eval|except|exec|exit|exp|fby|fills |first|fkeys|flip|floor|from|get|getenv|group|gtime|hclose|hcount|hdel|hopen|hsy m|iasc|identity|idesc|if|ij|in|insert|inter|inv|keys?|last|like|list|ljf?|load|l og|lower|lsq|ltime|ltrim|mavg|maxs?|mcount|md5|mdev|med|meta|mins?|mmax|mmin|mmu |mod|msum|neg|next|not|null|or|over|parse|peach|pj|plist|prds?|prev|prior|rand|r ank|ratios|raze|read0|read1|reciprocal|reval|reverse|rload|rotate|rsave|rtrim|sa ve|scan|scov|sdev|select|set|setenv|show|signum|sin|sqrt|ssr?|string|sublist|sum s?|sv|svar|system|tables|tan|til|trim|txf|type|uj|ungroup|union|update|upper|ups ert|value|var|views?|vs|wavg|where|while|within|wj1?|wsum|ww|xasc|xbar|xcols?|xd esc|xexp|xgroup|xkey|xlog|xprev|xrank)\b/,
35 'adverb': {
36 pattern: /['\/\\]:?|\beach\b/,
37 alias: 'function'
38 },
39 'verb': {
40 pattern: /(?:\B\.\B|\b[01]:|<[=>]?|>=?|[:+\-*%,!?_~=|$&#@^]):?/,
41 alias: 'operator'
42 },
43 'punctuation': /[(){}\[\];.]/
44 };
OLDNEW
« no previous file with comments | « lib/src/prism/components/prism-python.min.js ('k') | lib/src/prism/components/prism-q.min.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698