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

Side by Side Diff: lib/src/prism/components/prism-pascal.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
OLDNEW
1 // Based on Free Pascal 1 // Based on Free Pascal
2 2
3 /* TODO 3 /* TODO
4 Support inline asm ? 4 Support inline asm ?
5 */ 5 */
6 6
7 Prism.languages.pascal = { 7 Prism.languages.pascal = {
8 'comment': [ 8 'comment': [
9 /\(\*[\s\S]+?\*\)/, 9 /\(\*[\s\S]+?\*\)/,
10 /\{[\s\S]+?\}/, 10 /\{[\s\S]+?\}/,
11 /\/\/.*/ 11 /\/\/.*/
12 ], 12 ],
13 » 'string': [ 13 » 'string': /(?:'(?:''|[^'\r\n])*'|#[&$%]?[a-f\d]+)+|\^[a-z]/i,
14 » » /(?:'(?:''|[^'\n])*'|#[&$%]?[a-f\d]+)+/i,
15 » » // Char
16 » » /\^[a-z]/i
17 » ],
18 'keyword': [ 14 'keyword': [
19 { 15 {
20 // Turbo Pascal 16 // Turbo Pascal
21 » » » pattern: /(^|(?!&)[\s\S])\b(?:absolute|array|asm|begin|c ase|const|constructor|destructor|do|downto|else|end|file|for|function|goto|if|im plementation|inherited|inline|interface|label|nil|object|of|operator|packed|proc edure|program|record|reintroduce|repeat|self|set|string|then|to|type|unit|until| uses|var|while|with)\b/i, 17 » » » pattern: /(^|[^&])\b(?:absolute|array|asm|begin|case|con st|constructor|destructor|do|downto|else|end|file|for|function|goto|if|implement ation|inherited|inline|interface|label|nil|object|of|operator|packed|procedure|p rogram|record|reintroduce|repeat|self|set|string|then|to|type|unit|until|uses|va r|while|with)\b/i,
22 lookbehind: true 18 lookbehind: true
23 }, 19 },
24 { 20 {
25 // Free Pascal 21 // Free Pascal
26 » » » pattern: /(^|(?!&)[\s\S])\b(?:dispose|exit|false|new|tru e)\b/i, 22 » » » pattern: /(^|[^&])\b(?:dispose|exit|false|new|true)\b/i,
27 lookbehind: true 23 lookbehind: true
28 }, 24 },
29 { 25 {
30 // Object Pascal 26 // Object Pascal
31 » » » pattern: /(^|(?!&)[\s\S])\b(?:class|dispinterface|except |exports|finalization|finally|initialization|inline|library|on|out|packed|proper ty|raise|resourcestring|threadvar|try)\b/i, 27 » » » pattern: /(^|[^&])\b(?:class|dispinterface|except|export s|finalization|finally|initialization|inline|library|on|out|packed|property|rais e|resourcestring|threadvar|try)\b/i,
32 lookbehind: true 28 lookbehind: true
33 }, 29 },
34 { 30 {
35 // Modifiers 31 // Modifiers
36 » » » pattern: /(^|(?!&)[\s\S])\b(?:absolute|abstract|alias|as sembler|bitpacked|break|cdecl|continue|cppdecl|cvar|default|deprecated|dynamic|e numerator|experimental|export|external|far|far16|forward|generic|helper|implemen ts|index|interrupt|iochecks|local|message|name|near|nodefault|noreturn|nostackfr ame|oldfpccall|otherwise|overload|override|pascal|platform|private|protected|pub lic|published|read|register|reintroduce|result|safecall|saveregisters|softfloat| specialize|static|stdcall|stored|strict|unaligned|unimplemented|varargs|virtual| write)\b/i, 32 » » » pattern: /(^|[^&])\b(?:absolute|abstract|alias|assembler |bitpacked|break|cdecl|continue|cppdecl|cvar|default|deprecated|dynamic|enumerat or|experimental|export|external|far|far16|forward|generic|helper|implements|inde x|interrupt|iochecks|local|message|name|near|nodefault|noreturn|nostackframe|old fpccall|otherwise|overload|override|pascal|platform|private|protected|public|pub lished|read|register|reintroduce|result|safecall|saveregisters|softfloat|special ize|static|stdcall|stored|strict|unaligned|unimplemented|varargs|virtual|write)\ b/i,
37 lookbehind: true 33 lookbehind: true
38 } 34 }
39 ], 35 ],
40 'number': [ 36 'number': [
41 // Hexadecimal, octal and binary 37 // Hexadecimal, octal and binary
42 /[+-]?(?:[&%]\d+|\$[a-f\d]+)/i, 38 /[+-]?(?:[&%]\d+|\$[a-f\d]+)/i,
43 // Decimal 39 // Decimal
44 /([+-]|\b)\d+(?:\.\d+)?(?:e[+-]?\d+)?/i 40 /([+-]|\b)\d+(?:\.\d+)?(?:e[+-]?\d+)?/i
45 ], 41 ],
46 'operator': [ 42 'operator': [
47 » » /\.\.|\*\*|:=|[<>]{2}|[<>+\-*\/]=?|[@^=]/i, 43 » » /\.\.|\*\*|:=|<[<=>]?|>[>=]?|[+\-*\/]=?|[@^=]/i,
48 { 44 {
49 » » » pattern: /(^|(?!&)[\s\S])\b(?:and|as|div|exclude|in|incl ude|is|mod|not|or|shl|shr|xor)\b/, 45 » » » pattern: /(^|[^&])\b(?:and|as|div|exclude|in|include|is| mod|not|or|shl|shr|xor)\b/,
50 lookbehind: true 46 lookbehind: true
51 } 47 }
52 ], 48 ],
53 'punctuation': /\(\.|\.\)|[()\[\]:;,.]/ 49 'punctuation': /\(\.|\.\)|[()\[\]:;,.]/
54 }; 50 };
OLDNEW
« no previous file with comments | « lib/src/prism/components/prism-ocaml.min.js ('k') | lib/src/prism/components/prism-pascal.min.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698