mode-pgsql.js 78 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489
  1. ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
  2. "use strict";
  3. var oop = require("../lib/oop");
  4. var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
  5. var DocCommentHighlightRules = function() {
  6. this.$rules = {
  7. "start" : [ {
  8. token : "comment.doc.tag",
  9. regex : "@[\\w\\d_]+" // TODO: fix email addresses
  10. },
  11. DocCommentHighlightRules.getTagRule(),
  12. {
  13. defaultToken : "comment.doc",
  14. caseInsensitive: true
  15. }]
  16. };
  17. };
  18. oop.inherits(DocCommentHighlightRules, TextHighlightRules);
  19. DocCommentHighlightRules.getTagRule = function(start) {
  20. return {
  21. token : "comment.doc.tag.storage.type",
  22. regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b"
  23. };
  24. }
  25. DocCommentHighlightRules.getStartRule = function(start) {
  26. return {
  27. token : "comment.doc", // doc comment
  28. regex : "\\/\\*(?=\\*)",
  29. next : start
  30. };
  31. };
  32. DocCommentHighlightRules.getEndRule = function (start) {
  33. return {
  34. token : "comment.doc", // closing comment
  35. regex : "\\*\\/",
  36. next : start
  37. };
  38. };
  39. exports.DocCommentHighlightRules = DocCommentHighlightRules;
  40. });
  41. ace.define("ace/mode/perl_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
  42. "use strict";
  43. var oop = require("../lib/oop");
  44. var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
  45. var PerlHighlightRules = function() {
  46. var keywords = (
  47. "base|constant|continue|else|elsif|for|foreach|format|goto|if|last|local|my|next|" +
  48. "no|package|parent|redo|require|scalar|sub|unless|until|while|use|vars"
  49. );
  50. var buildinConstants = ("ARGV|ENV|INC|SIG");
  51. var builtinFunctions = (
  52. "getprotobynumber|getprotobyname|getservbyname|gethostbyaddr|" +
  53. "gethostbyname|getservbyport|getnetbyaddr|getnetbyname|getsockname|" +
  54. "getpeername|setpriority|getprotoent|setprotoent|getpriority|" +
  55. "endprotoent|getservent|setservent|endservent|sethostent|socketpair|" +
  56. "getsockopt|gethostent|endhostent|setsockopt|setnetent|quotemeta|" +
  57. "localtime|prototype|getnetent|endnetent|rewinddir|wantarray|getpwuid|" +
  58. "closedir|getlogin|readlink|endgrent|getgrgid|getgrnam|shmwrite|" +
  59. "shutdown|readline|endpwent|setgrent|readpipe|formline|truncate|" +
  60. "dbmclose|syswrite|setpwent|getpwnam|getgrent|getpwent|ucfirst|sysread|" +
  61. "setpgrp|shmread|sysseek|sysopen|telldir|defined|opendir|connect|" +
  62. "lcfirst|getppid|binmode|syscall|sprintf|getpgrp|readdir|seekdir|" +
  63. "waitpid|reverse|unshift|symlink|dbmopen|semget|msgrcv|rename|listen|" +
  64. "chroot|msgsnd|shmctl|accept|unpack|exists|fileno|shmget|system|" +
  65. "unlink|printf|gmtime|msgctl|semctl|values|rindex|substr|splice|" +
  66. "length|msgget|select|socket|return|caller|delete|alarm|ioctl|index|" +
  67. "undef|lstat|times|srand|chown|fcntl|close|write|umask|rmdir|study|" +
  68. "sleep|chomp|untie|print|utime|mkdir|atan2|split|crypt|flock|chmod|" +
  69. "BEGIN|bless|chdir|semop|shift|reset|link|stat|chop|grep|fork|dump|" +
  70. "join|open|tell|pipe|exit|glob|warn|each|bind|sort|pack|eval|push|" +
  71. "keys|getc|kill|seek|sqrt|send|wait|rand|tied|read|time|exec|recv|" +
  72. "eof|chr|int|ord|exp|pos|pop|sin|log|abs|oct|hex|tie|cos|vec|END|ref|" +
  73. "map|die|uc|lc|do"
  74. );
  75. var keywordMapper = this.createKeywordMapper({
  76. "keyword": keywords,
  77. "constant.language": buildinConstants,
  78. "support.function": builtinFunctions
  79. }, "identifier");
  80. this.$rules = {
  81. "start" : [
  82. {
  83. token : "comment.doc",
  84. regex : "^=(?:begin|item)\\b",
  85. next : "block_comment"
  86. }, {
  87. token : "string.regexp",
  88. regex : "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"
  89. }, {
  90. token : "string", // single line
  91. regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
  92. }, {
  93. token : "string", // multi line string start
  94. regex : '["].*\\\\$',
  95. next : "qqstring"
  96. }, {
  97. token : "string", // single line
  98. regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
  99. }, {
  100. token : "string", // multi line string start
  101. regex : "['].*\\\\$",
  102. next : "qstring"
  103. }, {
  104. token : "constant.numeric", // hex
  105. regex : "0x[0-9a-fA-F]+\\b"
  106. }, {
  107. token : "constant.numeric", // float
  108. regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
  109. }, {
  110. token : keywordMapper,
  111. regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
  112. }, {
  113. token : "keyword.operator",
  114. regex : "%#|\\$#|\\.\\.\\.|\\|\\|=|>>=|<<=|<=>|&&=|=>|!~|\\^=|&=|\\|=|\\.=|x=|%=|\\/=|\\*=|\\-=|\\+=|=~|\\*\\*|\\-\\-|\\.\\.|\\|\\||&&|\\+\\+|\\->|!=|==|>=|<=|>>|<<|,|=|\\?\\:|\\^|\\||x|%|\\/|\\*|<|&|\\\\|~|!|>|\\.|\\-|\\+|\\-C|\\-b|\\-S|\\-u|\\-t|\\-p|\\-l|\\-d|\\-f|\\-g|\\-s|\\-z|\\-k|\\-e|\\-O|\\-T|\\-B|\\-M|\\-A|\\-X|\\-W|\\-c|\\-R|\\-o|\\-x|\\-w|\\-r|\\b(?:and|cmp|eq|ge|gt|le|lt|ne|not|or|xor)"
  115. }, {
  116. token : "comment",
  117. regex : "#.*$"
  118. }, {
  119. token : "lparen",
  120. regex : "[[({]"
  121. }, {
  122. token : "rparen",
  123. regex : "[\\])}]"
  124. }, {
  125. token : "text",
  126. regex : "\\s+"
  127. }
  128. ],
  129. "qqstring" : [
  130. {
  131. token : "string",
  132. regex : '(?:(?:\\\\.)|(?:[^"\\\\]))*?"',
  133. next : "start"
  134. }, {
  135. token : "string",
  136. regex : '.+'
  137. }
  138. ],
  139. "qstring" : [
  140. {
  141. token : "string",
  142. regex : "(?:(?:\\\\.)|(?:[^'\\\\]))*?'",
  143. next : "start"
  144. }, {
  145. token : "string",
  146. regex : '.+'
  147. }
  148. ],
  149. "block_comment": [
  150. {
  151. token: "comment.doc",
  152. regex: "^=cut\\b",
  153. next: "start"
  154. },
  155. {
  156. defaultToken: "comment.doc"
  157. }
  158. ]
  159. };
  160. };
  161. oop.inherits(PerlHighlightRules, TextHighlightRules);
  162. exports.PerlHighlightRules = PerlHighlightRules;
  163. });
  164. ace.define("ace/mode/python_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
  165. "use strict";
  166. var oop = require("../lib/oop");
  167. var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
  168. var PythonHighlightRules = function() {
  169. var keywords = (
  170. "and|as|assert|break|class|continue|def|del|elif|else|except|exec|" +
  171. "finally|for|from|global|if|import|in|is|lambda|not|or|pass|print|" +
  172. "raise|return|try|while|with|yield"
  173. );
  174. var builtinConstants = (
  175. "True|False|None|NotImplemented|Ellipsis|__debug__"
  176. );
  177. var builtinFunctions = (
  178. "abs|divmod|input|open|staticmethod|all|enumerate|int|ord|str|any|" +
  179. "eval|isinstance|pow|sum|basestring|execfile|issubclass|print|super|" +
  180. "binfile|iter|property|tuple|bool|filter|len|range|type|bytearray|" +
  181. "float|list|raw_input|unichr|callable|format|locals|reduce|unicode|" +
  182. "chr|frozenset|long|reload|vars|classmethod|getattr|map|repr|xrange|" +
  183. "cmp|globals|max|reversed|zip|compile|hasattr|memoryview|round|" +
  184. "__import__|complex|hash|min|set|apply|delattr|help|next|setattr|" +
  185. "buffer|dict|hex|object|slice|coerce|dir|id|oct|sorted|intern"
  186. );
  187. var keywordMapper = this.createKeywordMapper({
  188. "invalid.deprecated": "debugger",
  189. "support.function": builtinFunctions,
  190. "constant.language": builtinConstants,
  191. "keyword": keywords
  192. }, "identifier");
  193. var strPre = "(?:r|u|ur|R|U|UR|Ur|uR)?";
  194. var decimalInteger = "(?:(?:[1-9]\\d*)|(?:0))";
  195. var octInteger = "(?:0[oO]?[0-7]+)";
  196. var hexInteger = "(?:0[xX][\\dA-Fa-f]+)";
  197. var binInteger = "(?:0[bB][01]+)";
  198. var integer = "(?:" + decimalInteger + "|" + octInteger + "|" + hexInteger + "|" + binInteger + ")";
  199. var exponent = "(?:[eE][+-]?\\d+)";
  200. var fraction = "(?:\\.\\d+)";
  201. var intPart = "(?:\\d+)";
  202. var pointFloat = "(?:(?:" + intPart + "?" + fraction + ")|(?:" + intPart + "\\.))";
  203. var exponentFloat = "(?:(?:" + pointFloat + "|" + intPart + ")" + exponent + ")";
  204. var floatNumber = "(?:" + exponentFloat + "|" + pointFloat + ")";
  205. var stringEscape = "\\\\(x[0-9A-Fa-f]{2}|[0-7]{3}|[\\\\abfnrtv'\"]|U[0-9A-Fa-f]{8}|u[0-9A-Fa-f]{4})";
  206. this.$rules = {
  207. "start" : [ {
  208. token : "comment",
  209. regex : "#.*$"
  210. }, {
  211. token : "string", // multi line """ string start
  212. regex : strPre + '"{3}',
  213. next : "qqstring3"
  214. }, {
  215. token : "string", // " string
  216. regex : strPre + '"(?=.)',
  217. next : "qqstring"
  218. }, {
  219. token : "string", // multi line ''' string start
  220. regex : strPre + "'{3}",
  221. next : "qstring3"
  222. }, {
  223. token : "string", // ' string
  224. regex : strPre + "'(?=.)",
  225. next : "qstring"
  226. }, {
  227. token : "constant.numeric", // imaginary
  228. regex : "(?:" + floatNumber + "|\\d+)[jJ]\\b"
  229. }, {
  230. token : "constant.numeric", // float
  231. regex : floatNumber
  232. }, {
  233. token : "constant.numeric", // long integer
  234. regex : integer + "[lL]\\b"
  235. }, {
  236. token : "constant.numeric", // integer
  237. regex : integer + "\\b"
  238. }, {
  239. token : keywordMapper,
  240. regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
  241. }, {
  242. token : "keyword.operator",
  243. regex : "\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|%|<<|>>|&|\\||\\^|~|<|>|<=|=>|==|!=|<>|="
  244. }, {
  245. token : "paren.lparen",
  246. regex : "[\\[\\(\\{]"
  247. }, {
  248. token : "paren.rparen",
  249. regex : "[\\]\\)\\}]"
  250. }, {
  251. token : "text",
  252. regex : "\\s+"
  253. } ],
  254. "qqstring3" : [ {
  255. token : "constant.language.escape",
  256. regex : stringEscape
  257. }, {
  258. token : "string", // multi line """ string end
  259. regex : '"{3}',
  260. next : "start"
  261. }, {
  262. defaultToken : "string"
  263. } ],
  264. "qstring3" : [ {
  265. token : "constant.language.escape",
  266. regex : stringEscape
  267. }, {
  268. token : "string", // multi line ''' string end
  269. regex : "'{3}",
  270. next : "start"
  271. }, {
  272. defaultToken : "string"
  273. } ],
  274. "qqstring" : [{
  275. token : "constant.language.escape",
  276. regex : stringEscape
  277. }, {
  278. token : "string",
  279. regex : "\\\\$",
  280. next : "qqstring"
  281. }, {
  282. token : "string",
  283. regex : '"|$',
  284. next : "start"
  285. }, {
  286. defaultToken: "string"
  287. }],
  288. "qstring" : [{
  289. token : "constant.language.escape",
  290. regex : stringEscape
  291. }, {
  292. token : "string",
  293. regex : "\\\\$",
  294. next : "qstring"
  295. }, {
  296. token : "string",
  297. regex : "'|$",
  298. next : "start"
  299. }, {
  300. defaultToken: "string"
  301. }]
  302. };
  303. };
  304. oop.inherits(PythonHighlightRules, TextHighlightRules);
  305. exports.PythonHighlightRules = PythonHighlightRules;
  306. });
  307. ace.define("ace/mode/json_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
  308. "use strict";
  309. var oop = require("../lib/oop");
  310. var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
  311. var JsonHighlightRules = function() {
  312. this.$rules = {
  313. "start" : [
  314. {
  315. token : "variable", // single line
  316. regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]\\s*(?=:)'
  317. }, {
  318. token : "string", // single line
  319. regex : '"',
  320. next : "string"
  321. }, {
  322. token : "constant.numeric", // hex
  323. regex : "0[xX][0-9a-fA-F]+\\b"
  324. }, {
  325. token : "constant.numeric", // float
  326. regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
  327. }, {
  328. token : "constant.language.boolean",
  329. regex : "(?:true|false)\\b"
  330. }, {
  331. token : "invalid.illegal", // single quoted strings are not allowed
  332. regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
  333. }, {
  334. token : "invalid.illegal", // comments are not allowed
  335. regex : "\\/\\/.*$"
  336. }, {
  337. token : "paren.lparen",
  338. regex : "[[({]"
  339. }, {
  340. token : "paren.rparen",
  341. regex : "[\\])}]"
  342. }, {
  343. token : "text",
  344. regex : "\\s+"
  345. }
  346. ],
  347. "string" : [
  348. {
  349. token : "constant.language.escape",
  350. regex : /\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|["\\\/bfnrt])/
  351. }, {
  352. token : "string",
  353. regex : '[^"\\\\]+'
  354. }, {
  355. token : "string",
  356. regex : '"',
  357. next : "start"
  358. }, {
  359. token : "string",
  360. regex : "",
  361. next : "start"
  362. }
  363. ]
  364. };
  365. };
  366. oop.inherits(JsonHighlightRules, TextHighlightRules);
  367. exports.JsonHighlightRules = JsonHighlightRules;
  368. });
  369. ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) {
  370. "use strict";
  371. var oop = require("../lib/oop");
  372. var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
  373. var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
  374. var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*";
  375. var JavaScriptHighlightRules = function(options) {
  376. var keywordMapper = this.createKeywordMapper({
  377. "variable.language":
  378. "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors
  379. "Namespace|QName|XML|XMLList|" + // E4X
  380. "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" +
  381. "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" +
  382. "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors
  383. "SyntaxError|TypeError|URIError|" +
  384. "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions
  385. "isNaN|parseFloat|parseInt|" +
  386. "JSON|Math|" + // Other
  387. "this|arguments|prototype|window|document" , // Pseudo
  388. "keyword":
  389. "const|yield|import|get|set|async|await|" +
  390. "break|case|catch|continue|default|delete|do|else|finally|for|function|" +
  391. "if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" +
  392. "__parent__|__count__|escape|unescape|with|__proto__|" +
  393. "class|enum|extends|super|export|implements|private|public|interface|package|protected|static",
  394. "storage.type":
  395. "const|let|var|function",
  396. "constant.language":
  397. "null|Infinity|NaN|undefined",
  398. "support.function":
  399. "alert",
  400. "constant.language.boolean": "true|false"
  401. }, "identifier");
  402. var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void";
  403. var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex
  404. "u[0-9a-fA-F]{4}|" + // unicode
  405. "u{[0-9a-fA-F]{1,6}}|" + // es6 unicode
  406. "[0-2][0-7]{0,2}|" + // oct
  407. "3[0-7][0-7]?|" + // oct
  408. "[4-7][0-7]?|" + //oct
  409. ".)";
  410. this.$rules = {
  411. "no_regex" : [
  412. DocCommentHighlightRules.getStartRule("doc-start"),
  413. comments("no_regex"),
  414. {
  415. token : "string",
  416. regex : "'(?=.)",
  417. next : "qstring"
  418. }, {
  419. token : "string",
  420. regex : '"(?=.)',
  421. next : "qqstring"
  422. }, {
  423. token : "constant.numeric", // hex
  424. regex : /0(?:[xX][0-9a-fA-F]+|[bB][01]+)\b/
  425. }, {
  426. token : "constant.numeric", // float
  427. regex : /[+-]?\d[\d_]*(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/
  428. }, {
  429. token : [
  430. "storage.type", "punctuation.operator", "support.function",
  431. "punctuation.operator", "entity.name.function", "text","keyword.operator"
  432. ],
  433. regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)",
  434. next: "function_arguments"
  435. }, {
  436. token : [
  437. "storage.type", "punctuation.operator", "entity.name.function", "text",
  438. "keyword.operator", "text", "storage.type", "text", "paren.lparen"
  439. ],
  440. regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",
  441. next: "function_arguments"
  442. }, {
  443. token : [
  444. "entity.name.function", "text", "keyword.operator", "text", "storage.type",
  445. "text", "paren.lparen"
  446. ],
  447. regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",
  448. next: "function_arguments"
  449. }, {
  450. token : [
  451. "storage.type", "punctuation.operator", "entity.name.function", "text",
  452. "keyword.operator", "text",
  453. "storage.type", "text", "entity.name.function", "text", "paren.lparen"
  454. ],
  455. regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()",
  456. next: "function_arguments"
  457. }, {
  458. token : [
  459. "storage.type", "text", "entity.name.function", "text", "paren.lparen"
  460. ],
  461. regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()",
  462. next: "function_arguments"
  463. }, {
  464. token : [
  465. "entity.name.function", "text", "punctuation.operator",
  466. "text", "storage.type", "text", "paren.lparen"
  467. ],
  468. regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()",
  469. next: "function_arguments"
  470. }, {
  471. token : [
  472. "text", "text", "storage.type", "text", "paren.lparen"
  473. ],
  474. regex : "(:)(\\s*)(function)(\\s*)(\\()",
  475. next: "function_arguments"
  476. }, {
  477. token : "keyword",
  478. regex : "(?:" + kwBeforeRe + ")\\b",
  479. next : "start"
  480. }, {
  481. token : ["support.constant"],
  482. regex : /that\b/
  483. }, {
  484. token : ["storage.type", "punctuation.operator", "support.function.firebug"],
  485. regex : /(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/
  486. }, {
  487. token : keywordMapper,
  488. regex : identifierRe
  489. }, {
  490. token : "punctuation.operator",
  491. regex : /[.](?![.])/,
  492. next : "property"
  493. }, {
  494. token : "keyword.operator",
  495. regex : /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,
  496. next : "start"
  497. }, {
  498. token : "punctuation.operator",
  499. regex : /[?:,;.]/,
  500. next : "start"
  501. }, {
  502. token : "paren.lparen",
  503. regex : /[\[({]/,
  504. next : "start"
  505. }, {
  506. token : "paren.rparen",
  507. regex : /[\])}]/
  508. }, {
  509. token: "comment",
  510. regex: /^#!.*$/
  511. }
  512. ],
  513. property: [{
  514. token : "text",
  515. regex : "\\s+"
  516. }, {
  517. token : [
  518. "storage.type", "punctuation.operator", "entity.name.function", "text",
  519. "keyword.operator", "text",
  520. "storage.type", "text", "entity.name.function", "text", "paren.lparen"
  521. ],
  522. regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(?:(\\s+)(\\w+))?(\\s*)(\\()",
  523. next: "function_arguments"
  524. }, {
  525. token : "punctuation.operator",
  526. regex : /[.](?![.])/
  527. }, {
  528. token : "support.function",
  529. regex : /(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/
  530. }, {
  531. token : "support.function.dom",
  532. regex : /(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/
  533. }, {
  534. token : "support.constant",
  535. regex : /(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/
  536. }, {
  537. token : "identifier",
  538. regex : identifierRe
  539. }, {
  540. regex: "",
  541. token: "empty",
  542. next: "no_regex"
  543. }
  544. ],
  545. "start": [
  546. DocCommentHighlightRules.getStartRule("doc-start"),
  547. comments("start"),
  548. {
  549. token: "string.regexp",
  550. regex: "\\/",
  551. next: "regex"
  552. }, {
  553. token : "text",
  554. regex : "\\s+|^$",
  555. next : "start"
  556. }, {
  557. token: "empty",
  558. regex: "",
  559. next: "no_regex"
  560. }
  561. ],
  562. "regex": [
  563. {
  564. token: "regexp.keyword.operator",
  565. regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
  566. }, {
  567. token: "string.regexp",
  568. regex: "/[sxngimy]*",
  569. next: "no_regex"
  570. }, {
  571. token : "invalid",
  572. regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/
  573. }, {
  574. token : "constant.language.escape",
  575. regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/
  576. }, {
  577. token : "constant.language.delimiter",
  578. regex: /\|/
  579. }, {
  580. token: "constant.language.escape",
  581. regex: /\[\^?/,
  582. next: "regex_character_class"
  583. }, {
  584. token: "empty",
  585. regex: "$",
  586. next: "no_regex"
  587. }, {
  588. defaultToken: "string.regexp"
  589. }
  590. ],
  591. "regex_character_class": [
  592. {
  593. token: "regexp.charclass.keyword.operator",
  594. regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
  595. }, {
  596. token: "constant.language.escape",
  597. regex: "]",
  598. next: "regex"
  599. }, {
  600. token: "constant.language.escape",
  601. regex: "-"
  602. }, {
  603. token: "empty",
  604. regex: "$",
  605. next: "no_regex"
  606. }, {
  607. defaultToken: "string.regexp.charachterclass"
  608. }
  609. ],
  610. "function_arguments": [
  611. {
  612. token: "variable.parameter",
  613. regex: identifierRe
  614. }, {
  615. token: "punctuation.operator",
  616. regex: "[, ]+"
  617. }, {
  618. token: "punctuation.operator",
  619. regex: "$"
  620. }, {
  621. token: "empty",
  622. regex: "",
  623. next: "no_regex"
  624. }
  625. ],
  626. "qqstring" : [
  627. {
  628. token : "constant.language.escape",
  629. regex : escapedRe
  630. }, {
  631. token : "string",
  632. regex : "\\\\$",
  633. next : "qqstring"
  634. }, {
  635. token : "string",
  636. regex : '"|$',
  637. next : "no_regex"
  638. }, {
  639. defaultToken: "string"
  640. }
  641. ],
  642. "qstring" : [
  643. {
  644. token : "constant.language.escape",
  645. regex : escapedRe
  646. }, {
  647. token : "string",
  648. regex : "\\\\$",
  649. next : "qstring"
  650. }, {
  651. token : "string",
  652. regex : "'|$",
  653. next : "no_regex"
  654. }, {
  655. defaultToken: "string"
  656. }
  657. ]
  658. };
  659. if (!options || !options.noES6) {
  660. this.$rules.no_regex.unshift({
  661. regex: "[{}]", onMatch: function(val, state, stack) {
  662. this.next = val == "{" ? this.nextState : "";
  663. if (val == "{" && stack.length) {
  664. stack.unshift("start", state);
  665. }
  666. else if (val == "}" && stack.length) {
  667. stack.shift();
  668. this.next = stack.shift();
  669. if (this.next.indexOf("string") != -1 || this.next.indexOf("jsx") != -1)
  670. return "paren.quasi.end";
  671. }
  672. return val == "{" ? "paren.lparen" : "paren.rparen";
  673. },
  674. nextState: "start"
  675. }, {
  676. token : "string.quasi.start",
  677. regex : /`/,
  678. push : [{
  679. token : "constant.language.escape",
  680. regex : escapedRe
  681. }, {
  682. token : "paren.quasi.start",
  683. regex : /\${/,
  684. push : "start"
  685. }, {
  686. token : "string.quasi.end",
  687. regex : /`/,
  688. next : "pop"
  689. }, {
  690. defaultToken: "string.quasi"
  691. }]
  692. });
  693. if (!options || options.jsx != false)
  694. JSX.call(this);
  695. }
  696. this.embedRules(DocCommentHighlightRules, "doc-",
  697. [ DocCommentHighlightRules.getEndRule("no_regex") ]);
  698. this.normalizeRules();
  699. };
  700. oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
  701. function JSX() {
  702. var tagRegex = identifierRe.replace("\\d", "\\d\\-");
  703. var jsxTag = {
  704. onMatch : function(val, state, stack) {
  705. var offset = val.charAt(1) == "/" ? 2 : 1;
  706. if (offset == 1) {
  707. if (state != this.nextState)
  708. stack.unshift(this.next, this.nextState, 0);
  709. else
  710. stack.unshift(this.next);
  711. stack[2]++;
  712. } else if (offset == 2) {
  713. if (state == this.nextState) {
  714. stack[1]--;
  715. if (!stack[1] || stack[1] < 0) {
  716. stack.shift();
  717. stack.shift();
  718. }
  719. }
  720. }
  721. return [{
  722. type: "meta.tag.punctuation." + (offset == 1 ? "" : "end-") + "tag-open.xml",
  723. value: val.slice(0, offset)
  724. }, {
  725. type: "meta.tag.tag-name.xml",
  726. value: val.substr(offset)
  727. }];
  728. },
  729. regex : "</?" + tagRegex + "",
  730. next: "jsxAttributes",
  731. nextState: "jsx"
  732. };
  733. this.$rules.start.unshift(jsxTag);
  734. var jsxJsRule = {
  735. regex: "{",
  736. token: "paren.quasi.start",
  737. push: "start"
  738. };
  739. this.$rules.jsx = [
  740. jsxJsRule,
  741. jsxTag,
  742. {include : "reference"},
  743. {defaultToken: "string"}
  744. ];
  745. this.$rules.jsxAttributes = [{
  746. token : "meta.tag.punctuation.tag-close.xml",
  747. regex : "/?>",
  748. onMatch : function(value, currentState, stack) {
  749. if (currentState == stack[0])
  750. stack.shift();
  751. if (value.length == 2) {
  752. if (stack[0] == this.nextState)
  753. stack[1]--;
  754. if (!stack[1] || stack[1] < 0) {
  755. stack.splice(0, 2);
  756. }
  757. }
  758. this.next = stack[0] || "start";
  759. return [{type: this.token, value: value}];
  760. },
  761. nextState: "jsx"
  762. },
  763. jsxJsRule,
  764. comments("jsxAttributes"),
  765. {
  766. token : "entity.other.attribute-name.xml",
  767. regex : tagRegex
  768. }, {
  769. token : "keyword.operator.attribute-equals.xml",
  770. regex : "="
  771. }, {
  772. token : "text.tag-whitespace.xml",
  773. regex : "\\s+"
  774. }, {
  775. token : "string.attribute-value.xml",
  776. regex : "'",
  777. stateName : "jsx_attr_q",
  778. push : [
  779. {token : "string.attribute-value.xml", regex: "'", next: "pop"},
  780. {include : "reference"},
  781. {defaultToken : "string.attribute-value.xml"}
  782. ]
  783. }, {
  784. token : "string.attribute-value.xml",
  785. regex : '"',
  786. stateName : "jsx_attr_qq",
  787. push : [
  788. {token : "string.attribute-value.xml", regex: '"', next: "pop"},
  789. {include : "reference"},
  790. {defaultToken : "string.attribute-value.xml"}
  791. ]
  792. },
  793. jsxTag
  794. ];
  795. this.$rules.reference = [{
  796. token : "constant.language.escape.reference.xml",
  797. regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
  798. }];
  799. }
  800. function comments(next) {
  801. return [
  802. {
  803. token : "comment", // multi line comment
  804. regex : /\/\*/,
  805. next: [
  806. DocCommentHighlightRules.getTagRule(),
  807. {token : "comment", regex : "\\*\\/", next : next || "pop"},
  808. {defaultToken : "comment", caseInsensitive: true}
  809. ]
  810. }, {
  811. token : "comment",
  812. regex : "\\/\\/",
  813. next: [
  814. DocCommentHighlightRules.getTagRule(),
  815. {token : "comment", regex : "$|^", next : next || "pop"},
  816. {defaultToken : "comment", caseInsensitive: true}
  817. ]
  818. }
  819. ];
  820. }
  821. exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
  822. });
  823. ace.define("ace/mode/pgsql_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules","ace/mode/perl_highlight_rules","ace/mode/python_highlight_rules","ace/mode/json_highlight_rules","ace/mode/javascript_highlight_rules"], function(require, exports, module) {
  824. var oop = require("../lib/oop");
  825. var lang = require("../lib/lang");
  826. var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
  827. var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
  828. var PerlHighlightRules = require("./perl_highlight_rules").PerlHighlightRules;
  829. var PythonHighlightRules = require("./python_highlight_rules").PythonHighlightRules;
  830. var JsonHighlightRules = require("./json_highlight_rules").JsonHighlightRules;
  831. var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
  832. var PgsqlHighlightRules = function() {
  833. var keywords = (
  834. "abort|absolute|abstime|access|aclitem|action|add|admin|after|aggregate|all|also|alter|always|" +
  835. "analyse|analyze|and|any|anyarray|anyelement|anyenum|anynonarray|anyrange|array|as|asc|" +
  836. "assertion|assignment|asymmetric|at|attribute|authorization|backward|before|begin|between|" +
  837. "bigint|binary|bit|bool|boolean|both|box|bpchar|by|bytea|cache|called|cascade|cascaded|case|cast|" +
  838. "catalog|chain|char|character|characteristics|check|checkpoint|cid|cidr|circle|class|close|" +
  839. "cluster|coalesce|collate|collation|column|comment|comments|commit|committed|concurrently|" +
  840. "configuration|connection|constraint|constraints|content|continue|conversion|copy|cost|" +
  841. "create|cross|cstring|csv|current|current_catalog|current_date|current_role|" +
  842. "current_schema|current_time|current_timestamp|current_user|cursor|cycle|data|database|" +
  843. "date|daterange|day|deallocate|dec|decimal|declare|default|defaults|deferrable|deferred|" +
  844. "definer|delete|delimiter|delimiters|desc|dictionary|disable|discard|distinct|do|document|" +
  845. "domain|double|drop|each|else|enable|encoding|encrypted|end|enum|escape|event|event_trigger|" +
  846. "except|exclude|excluding|exclusive|execute|exists|explain|extension|external|extract|false|" +
  847. "family|fdw_handler|fetch|first|float|float4|float8|following|for|force|foreign|forward|" +
  848. "freeze|from|full|function|functions|global|grant|granted|greatest|group|gtsvector|handler|" +
  849. "having|header|hold|hour|identity|if|ilike|immediate|immutable|implicit|in|including|" +
  850. "increment|index|indexes|inet|inherit|inherits|initially|inline|inner|inout|input|" +
  851. "insensitive|insert|instead|int|int2|int2vector|int4|int4range|int8|int8range|integer|" +
  852. "internal|intersect|interval|into|invoker|is|isnull|isolation|join|json|key|label|language|" +
  853. "language_handler|large|last|lateral|lc_collate|lc_ctype|leading|leakproof|least|left|level|" +
  854. "like|limit|line|listen|load|local|localtime|localtimestamp|location|lock|lseg|macaddr|" +
  855. "mapping|match|materialized|maxvalue|minute|minvalue|mode|money|month|move|name|names|" +
  856. "national|natural|nchar|next|no|none|not|nothing|notify|notnull|nowait|null|nullif|nulls|" +
  857. "numeric|numrange|object|of|off|offset|oid|oids|oidvector|on|only|opaque|operator|option|" +
  858. "options|or|order|out|outer|over|overlaps|overlay|owned|owner|parser|partial|partition|passing|" +
  859. "password|path|pg_attribute|pg_auth_members|pg_authid|pg_class|pg_database|pg_node_tree|" +
  860. "pg_proc|pg_type|placing|plans|point|polygon|position|preceding|precision|prepare|prepared|" +
  861. "preserve|primary|prior|privileges|procedural|procedure|program|quote|range|read|real|" +
  862. "reassign|recheck|record|recursive|ref|refcursor|references|refresh|regclass|regconfig|" +
  863. "regdictionary|regoper|regoperator|regproc|regprocedure|regtype|reindex|relative|release|" +
  864. "reltime|rename|repeatable|replace|replica|reset|restart|restrict|returning|returns|revoke|" +
  865. "right|role|rollback|row|rows|rule|savepoint|schema|scroll|search|second|security|select|" +
  866. "sequence|sequences|serializable|server|session|session_user|set|setof|share|show|similar|" +
  867. "simple|smallint|smgr|snapshot|some|stable|standalone|start|statement|statistics|stdin|" +
  868. "stdout|storage|strict|strip|substring|symmetric|sysid|system|table|tables|tablespace|temp|" +
  869. "template|temporary|text|then|tid|time|timestamp|timestamptz|timetz|tinterval|to|trailing|" +
  870. "transaction|treat|trigger|trim|true|truncate|trusted|tsquery|tsrange|tstzrange|tsvector|" +
  871. "txid_snapshot|type|types|unbounded|uncommitted|unencrypted|union|unique|unknown|unlisten|" +
  872. "unlogged|until|update|user|using|uuid|vacuum|valid|validate|validator|value|values|varbit|" +
  873. "varchar|variadic|varying|verbose|version|view|void|volatile|when|where|whitespace|window|" +
  874. "with|without|work|wrapper|write|xid|xml|xmlattributes|xmlconcat|xmlelement|xmlexists|" +
  875. "xmlforest|xmlparse|xmlpi|xmlroot|xmlserialize|year|yes|zone"
  876. );
  877. var builtinFunctions = (
  878. "RI_FKey_cascade_del|RI_FKey_cascade_upd|RI_FKey_check_ins|RI_FKey_check_upd|" +
  879. "RI_FKey_noaction_del|RI_FKey_noaction_upd|RI_FKey_restrict_del|RI_FKey_restrict_upd|" +
  880. "RI_FKey_setdefault_del|RI_FKey_setdefault_upd|RI_FKey_setnull_del|" +
  881. "RI_FKey_setnull_upd|abbrev|abs|abstime|abstimeeq|abstimege|abstimegt|abstimein|abstimele|" +
  882. "abstimelt|abstimene|abstimeout|abstimerecv|abstimesend|aclcontains|acldefault|" +
  883. "aclexplode|aclinsert|aclitemeq|aclitemin|aclitemout|aclremove|acos|age|any_in|any_out|" +
  884. "anyarray_in|anyarray_out|anyarray_recv|anyarray_send|anyelement_in|anyelement_out|" +
  885. "anyenum_in|anyenum_out|anynonarray_in|anynonarray_out|anyrange_in|anyrange_out|" +
  886. "anytextcat|area|areajoinsel|areasel|array_agg|array_agg_finalfn|array_agg_transfn|" +
  887. "array_append|array_cat|array_dims|array_eq|array_fill|array_ge|array_gt|array_in|" +
  888. "array_larger|array_le|array_length|array_lower|array_lt|array_ndims|array_ne|array_out|" +
  889. "array_prepend|array_recv|array_remove|array_replace|array_send|array_smaller|" +
  890. "array_to_json|array_to_string|array_typanalyze|array_upper|arraycontained|" +
  891. "arraycontains|arraycontjoinsel|arraycontsel|arrayoverlap|ascii|ascii_to_mic|" +
  892. "ascii_to_utf8|asin|atan|atan2|avg|big5_to_euc_tw|big5_to_mic|big5_to_utf8|bit_and|bit_in|" +
  893. "bit_length|bit_or|bit_out|bit_recv|bit_send|bitand|bitcat|bitcmp|biteq|bitge|bitgt|bitle|" +
  894. "bitlt|bitne|bitnot|bitor|bitshiftleft|bitshiftright|bittypmodin|bittypmodout|bitxor|bool|" +
  895. "bool_and|bool_or|booland_statefunc|booleq|boolge|boolgt|boolin|boolle|boollt|boolne|" +
  896. "boolor_statefunc|boolout|boolrecv|boolsend|box|box_above|box_above_eq|box_add|box_below|" +
  897. "box_below_eq|box_center|box_contain|box_contain_pt|box_contained|box_distance|box_div|" +
  898. "box_eq|box_ge|box_gt|box_in|box_intersect|box_le|box_left|box_lt|box_mul|box_out|" +
  899. "box_overabove|box_overbelow|box_overlap|box_overleft|box_overright|box_recv|box_right|" +
  900. "box_same|box_send|box_sub|bpchar_larger|bpchar_pattern_ge|bpchar_pattern_gt|" +
  901. "bpchar_pattern_le|bpchar_pattern_lt|bpchar_smaller|bpcharcmp|bpchareq|bpcharge|" +
  902. "bpchargt|bpchariclike|bpcharicnlike|bpcharicregexeq|bpcharicregexne|bpcharin|bpcharle|" +
  903. "bpcharlike|bpcharlt|bpcharne|bpcharnlike|bpcharout|bpcharrecv|bpcharregexeq|" +
  904. "bpcharregexne|bpcharsend|bpchartypmodin|bpchartypmodout|broadcast|btabstimecmp|" +
  905. "btarraycmp|btbeginscan|btboolcmp|btbpchar_pattern_cmp|btbuild|btbuildempty|" +
  906. "btbulkdelete|btcanreturn|btcharcmp|btcostestimate|btendscan|btfloat48cmp|btfloat4cmp|" +
  907. "btfloat4sortsupport|btfloat84cmp|btfloat8cmp|btfloat8sortsupport|btgetbitmap|" +
  908. "btgettuple|btinsert|btint24cmp|btint28cmp|btint2cmp|btint2sortsupport|btint42cmp|" +
  909. "btint48cmp|btint4cmp|btint4sortsupport|btint82cmp|btint84cmp|btint8cmp|" +
  910. "btint8sortsupport|btmarkpos|btnamecmp|btnamesortsupport|btoidcmp|btoidsortsupport|" +
  911. "btoidvectorcmp|btoptions|btrecordcmp|btreltimecmp|btrescan|btrestrpos|btrim|" +
  912. "bttext_pattern_cmp|bttextcmp|bttidcmp|bttintervalcmp|btvacuumcleanup|" +
  913. "bytea_string_agg_finalfn|bytea_string_agg_transfn|byteacat|byteacmp|byteaeq|byteage|" +
  914. "byteagt|byteain|byteale|bytealike|bytealt|byteane|byteanlike|byteaout|bytearecv|byteasend|" +
  915. "cash_cmp|cash_div_cash|cash_div_flt4|cash_div_flt8|cash_div_int2|cash_div_int4|cash_eq|" +
  916. "cash_ge|cash_gt|cash_in|cash_le|cash_lt|cash_mi|cash_mul_flt4|cash_mul_flt8|" +
  917. "cash_mul_int2|cash_mul_int4|cash_ne|cash_out|cash_pl|cash_recv|cash_send|cash_words|" +
  918. "cashlarger|cashsmaller|cbrt|ceil|ceiling|center|char|char_length|character_length|chareq|" +
  919. "charge|chargt|charin|charle|charlt|charne|charout|charrecv|charsend|chr|cideq|cidin|cidout|" +
  920. "cidr|cidr_in|cidr_out|cidr_recv|cidr_send|cidrecv|cidsend|circle|circle_above|" +
  921. "circle_add_pt|circle_below|circle_center|circle_contain|circle_contain_pt|" +
  922. "circle_contained|circle_distance|circle_div_pt|circle_eq|circle_ge|circle_gt|circle_in|" +
  923. "circle_le|circle_left|circle_lt|circle_mul_pt|circle_ne|circle_out|circle_overabove|" +
  924. "circle_overbelow|circle_overlap|circle_overleft|circle_overright|circle_recv|" +
  925. "circle_right|circle_same|circle_send|circle_sub_pt|clock_timestamp|close_lb|close_ls|" +
  926. "close_lseg|close_pb|close_pl|close_ps|close_sb|close_sl|col_description|concat|concat_ws|" +
  927. "contjoinsel|contsel|convert|convert_from|convert_to|corr|cos|cot|count|covar_pop|" +
  928. "covar_samp|cstring_in|cstring_out|cstring_recv|cstring_send|cume_dist|current_database|" +
  929. "current_query|current_schema|current_schemas|current_setting|current_user|currtid|" +
  930. "currtid2|currval|cursor_to_xml|cursor_to_xmlschema|database_to_xml|" +
  931. "database_to_xml_and_xmlschema|database_to_xmlschema|date|date_cmp|date_cmp_timestamp|" +
  932. "date_cmp_timestamptz|date_eq|date_eq_timestamp|date_eq_timestamptz|date_ge|" +
  933. "date_ge_timestamp|date_ge_timestamptz|date_gt|date_gt_timestamp|date_gt_timestamptz|" +
  934. "date_in|date_larger|date_le|date_le_timestamp|date_le_timestamptz|date_lt|" +
  935. "date_lt_timestamp|date_lt_timestamptz|date_mi|date_mi_interval|date_mii|date_ne|" +
  936. "date_ne_timestamp|date_ne_timestamptz|date_out|date_part|date_pl_interval|date_pli|" +
  937. "date_recv|date_send|date_smaller|date_sortsupport|date_trunc|daterange|" +
  938. "daterange_canonical|daterange_subdiff|datetime_pl|datetimetz_pl|dcbrt|decode|degrees|" +
  939. "dense_rank|dexp|diagonal|diameter|dispell_init|dispell_lexize|dist_cpoly|dist_lb|dist_pb|" +
  940. "dist_pc|dist_pl|dist_ppath|dist_ps|dist_sb|dist_sl|div|dlog1|dlog10|domain_in|domain_recv|" +
  941. "dpow|dround|dsimple_init|dsimple_lexize|dsnowball_init|dsnowball_lexize|dsqrt|" +
  942. "dsynonym_init|dsynonym_lexize|dtrunc|elem_contained_by_range|encode|enum_cmp|enum_eq|" +
  943. "enum_first|enum_ge|enum_gt|enum_in|enum_larger|enum_last|enum_le|enum_lt|enum_ne|enum_out|" +
  944. "enum_range|enum_recv|enum_send|enum_smaller|eqjoinsel|eqsel|euc_cn_to_mic|" +
  945. "euc_cn_to_utf8|euc_jis_2004_to_shift_jis_2004|euc_jis_2004_to_utf8|euc_jp_to_mic|" +
  946. "euc_jp_to_sjis|euc_jp_to_utf8|euc_kr_to_mic|euc_kr_to_utf8|euc_tw_to_big5|" +
  947. "euc_tw_to_mic|euc_tw_to_utf8|event_trigger_in|event_trigger_out|every|exp|factorial|" +
  948. "family|fdw_handler_in|fdw_handler_out|first_value|float4|float48div|float48eq|float48ge|" +
  949. "float48gt|float48le|float48lt|float48mi|float48mul|float48ne|float48pl|float4_accum|" +
  950. "float4abs|float4div|float4eq|float4ge|float4gt|float4in|float4larger|float4le|float4lt|" +
  951. "float4mi|float4mul|float4ne|float4out|float4pl|float4recv|float4send|float4smaller|" +
  952. "float4um|float4up|float8|float84div|float84eq|float84ge|float84gt|float84le|float84lt|" +
  953. "float84mi|float84mul|float84ne|float84pl|float8_accum|float8_avg|float8_corr|" +
  954. "float8_covar_pop|float8_covar_samp|float8_regr_accum|float8_regr_avgx|" +
  955. "float8_regr_avgy|float8_regr_intercept|float8_regr_r2|float8_regr_slope|" +
  956. "float8_regr_sxx|float8_regr_sxy|float8_regr_syy|float8_stddev_pop|float8_stddev_samp|" +
  957. "float8_var_pop|float8_var_samp|float8abs|float8div|float8eq|float8ge|float8gt|float8in|" +
  958. "float8larger|float8le|float8lt|float8mi|float8mul|float8ne|float8out|float8pl|float8recv|" +
  959. "float8send|float8smaller|float8um|float8up|floor|flt4_mul_cash|flt8_mul_cash|" +
  960. "fmgr_c_validator|fmgr_internal_validator|fmgr_sql_validator|format|format_type|" +
  961. "gb18030_to_utf8|gbk_to_utf8|generate_series|generate_subscripts|get_bit|get_byte|" +
  962. "get_current_ts_config|getdatabaseencoding|getpgusername|gin_cmp_prefix|" +
  963. "gin_cmp_tslexeme|gin_extract_tsquery|gin_extract_tsvector|gin_tsquery_consistent|" +
  964. "ginarrayconsistent|ginarrayextract|ginbeginscan|ginbuild|ginbuildempty|ginbulkdelete|" +
  965. "gincostestimate|ginendscan|gingetbitmap|gininsert|ginmarkpos|ginoptions|" +
  966. "ginqueryarrayextract|ginrescan|ginrestrpos|ginvacuumcleanup|gist_box_compress|" +
  967. "gist_box_consistent|gist_box_decompress|gist_box_penalty|gist_box_picksplit|" +
  968. "gist_box_same|gist_box_union|gist_circle_compress|gist_circle_consistent|" +
  969. "gist_point_compress|gist_point_consistent|gist_point_distance|gist_poly_compress|" +
  970. "gist_poly_consistent|gistbeginscan|gistbuild|gistbuildempty|gistbulkdelete|" +
  971. "gistcostestimate|gistendscan|gistgetbitmap|gistgettuple|gistinsert|gistmarkpos|" +
  972. "gistoptions|gistrescan|gistrestrpos|gistvacuumcleanup|gtsquery_compress|" +
  973. "gtsquery_consistent|gtsquery_decompress|gtsquery_penalty|gtsquery_picksplit|" +
  974. "gtsquery_same|gtsquery_union|gtsvector_compress|gtsvector_consistent|" +
  975. "gtsvector_decompress|gtsvector_penalty|gtsvector_picksplit|gtsvector_same|" +
  976. "gtsvector_union|gtsvectorin|gtsvectorout|has_any_column_privilege|" +
  977. "has_column_privilege|has_database_privilege|has_foreign_data_wrapper_privilege|" +
  978. "has_function_privilege|has_language_privilege|has_schema_privilege|" +
  979. "has_sequence_privilege|has_server_privilege|has_table_privilege|" +
  980. "has_tablespace_privilege|has_type_privilege|hash_aclitem|hash_array|hash_numeric|" +
  981. "hash_range|hashbeginscan|hashbpchar|hashbuild|hashbuildempty|hashbulkdelete|hashchar|" +
  982. "hashcostestimate|hashendscan|hashenum|hashfloat4|hashfloat8|hashgetbitmap|hashgettuple|" +
  983. "hashinet|hashinsert|hashint2|hashint2vector|hashint4|hashint8|hashmacaddr|hashmarkpos|" +
  984. "hashname|hashoid|hashoidvector|hashoptions|hashrescan|hashrestrpos|hashtext|" +
  985. "hashvacuumcleanup|hashvarlena|height|host|hostmask|iclikejoinsel|iclikesel|" +
  986. "icnlikejoinsel|icnlikesel|icregexeqjoinsel|icregexeqsel|icregexnejoinsel|icregexnesel|" +
  987. "inet_client_addr|inet_client_port|inet_in|inet_out|inet_recv|inet_send|" +
  988. "inet_server_addr|inet_server_port|inetand|inetmi|inetmi_int8|inetnot|inetor|inetpl|" +
  989. "initcap|int2|int24div|int24eq|int24ge|int24gt|int24le|int24lt|int24mi|int24mul|int24ne|" +
  990. "int24pl|int28div|int28eq|int28ge|int28gt|int28le|int28lt|int28mi|int28mul|int28ne|int28pl|" +
  991. "int2_accum|int2_avg_accum|int2_mul_cash|int2_sum|int2abs|int2and|int2div|int2eq|int2ge|" +
  992. "int2gt|int2in|int2larger|int2le|int2lt|int2mi|int2mod|int2mul|int2ne|int2not|int2or|int2out|" +
  993. "int2pl|int2recv|int2send|int2shl|int2shr|int2smaller|int2um|int2up|int2vectoreq|" +
  994. "int2vectorin|int2vectorout|int2vectorrecv|int2vectorsend|int2xor|int4|int42div|int42eq|" +
  995. "int42ge|int42gt|int42le|int42lt|int42mi|int42mul|int42ne|int42pl|int48div|int48eq|int48ge|" +
  996. "int48gt|int48le|int48lt|int48mi|int48mul|int48ne|int48pl|int4_accum|int4_avg_accum|" +
  997. "int4_mul_cash|int4_sum|int4abs|int4and|int4div|int4eq|int4ge|int4gt|int4in|int4inc|" +
  998. "int4larger|int4le|int4lt|int4mi|int4mod|int4mul|int4ne|int4not|int4or|int4out|int4pl|" +
  999. "int4range|int4range_canonical|int4range_subdiff|int4recv|int4send|int4shl|int4shr|" +
  1000. "int4smaller|int4um|int4up|int4xor|int8|int82div|int82eq|int82ge|int82gt|int82le|int82lt|" +
  1001. "int82mi|int82mul|int82ne|int82pl|int84div|int84eq|int84ge|int84gt|int84le|int84lt|int84mi|" +
  1002. "int84mul|int84ne|int84pl|int8_accum|int8_avg|int8_avg_accum|int8_sum|int8abs|int8and|" +
  1003. "int8div|int8eq|int8ge|int8gt|int8in|int8inc|int8inc_any|int8inc_float8_float8|int8larger|" +
  1004. "int8le|int8lt|int8mi|int8mod|int8mul|int8ne|int8not|int8or|int8out|int8pl|int8pl_inet|" +
  1005. "int8range|int8range_canonical|int8range_subdiff|int8recv|int8send|int8shl|int8shr|" +
  1006. "int8smaller|int8um|int8up|int8xor|integer_pl_date|inter_lb|inter_sb|inter_sl|internal_in|" +
  1007. "internal_out|interval_accum|interval_avg|interval_cmp|interval_div|interval_eq|" +
  1008. "interval_ge|interval_gt|interval_hash|interval_in|interval_larger|interval_le|" +
  1009. "interval_lt|interval_mi|interval_mul|interval_ne|interval_out|interval_pl|" +
  1010. "interval_pl_date|interval_pl_time|interval_pl_timestamp|interval_pl_timestamptz|" +
  1011. "interval_pl_timetz|interval_recv|interval_send|interval_smaller|interval_transform|" +
  1012. "interval_um|intervaltypmodin|intervaltypmodout|intinterval|isclosed|isempty|isfinite|" +
  1013. "ishorizontal|iso8859_1_to_utf8|iso8859_to_utf8|iso_to_koi8r|iso_to_mic|iso_to_win1251|" +
  1014. "iso_to_win866|isopen|isparallel|isperp|isvertical|johab_to_utf8|json_agg|" +
  1015. "json_agg_finalfn|json_agg_transfn|json_array_element|json_array_element_text|" +
  1016. "json_array_elements|json_array_length|json_each|json_each_text|json_extract_path|" +
  1017. "json_extract_path_op|json_extract_path_text|json_extract_path_text_op|json_in|" +
  1018. "json_object_field|json_object_field_text|json_object_keys|json_out|" +
  1019. "json_populate_record|json_populate_recordset|json_recv|json_send|justify_days|" +
  1020. "justify_hours|justify_interval|koi8r_to_iso|koi8r_to_mic|koi8r_to_utf8|" +
  1021. "koi8r_to_win1251|koi8r_to_win866|koi8u_to_utf8|lag|language_handler_in|" +
  1022. "language_handler_out|last_value|lastval|latin1_to_mic|latin2_to_mic|latin2_to_win1250|" +
  1023. "latin3_to_mic|latin4_to_mic|lead|left|length|like|like_escape|likejoinsel|likesel|line|" +
  1024. "line_distance|line_eq|line_horizontal|line_in|line_interpt|line_intersect|line_out|" +
  1025. "line_parallel|line_perp|line_recv|line_send|line_vertical|ln|lo_close|lo_creat|lo_create|" +
  1026. "lo_export|lo_import|lo_lseek|lo_lseek64|lo_open|lo_tell|lo_tell64|lo_truncate|" +
  1027. "lo_truncate64|lo_unlink|log|loread|lower|lower_inc|lower_inf|lowrite|lpad|lseg|lseg_center|" +
  1028. "lseg_distance|lseg_eq|lseg_ge|lseg_gt|lseg_horizontal|lseg_in|lseg_interpt|" +
  1029. "lseg_intersect|lseg_le|lseg_length|lseg_lt|lseg_ne|lseg_out|lseg_parallel|lseg_perp|" +
  1030. "lseg_recv|lseg_send|lseg_vertical|ltrim|macaddr_and|macaddr_cmp|macaddr_eq|macaddr_ge|" +
  1031. "macaddr_gt|macaddr_in|macaddr_le|macaddr_lt|macaddr_ne|macaddr_not|macaddr_or|" +
  1032. "macaddr_out|macaddr_recv|macaddr_send|makeaclitem|masklen|max|md5|mic_to_ascii|" +
  1033. "mic_to_big5|mic_to_euc_cn|mic_to_euc_jp|mic_to_euc_kr|mic_to_euc_tw|mic_to_iso|" +
  1034. "mic_to_koi8r|mic_to_latin1|mic_to_latin2|mic_to_latin3|mic_to_latin4|mic_to_sjis|" +
  1035. "mic_to_win1250|mic_to_win1251|mic_to_win866|min|mktinterval|mod|money|mul_d_interval|" +
  1036. "name|nameeq|namege|namegt|nameiclike|nameicnlike|nameicregexeq|nameicregexne|namein|" +
  1037. "namele|namelike|namelt|namene|namenlike|nameout|namerecv|nameregexeq|nameregexne|namesend|" +
  1038. "neqjoinsel|neqsel|netmask|network|network_cmp|network_eq|network_ge|network_gt|" +
  1039. "network_le|network_lt|network_ne|network_sub|network_subeq|network_sup|network_supeq|" +
  1040. "nextval|nlikejoinsel|nlikesel|notlike|now|npoints|nth_value|ntile|numeric_abs|" +
  1041. "numeric_accum|numeric_add|numeric_avg|numeric_avg_accum|numeric_cmp|numeric_div|" +
  1042. "numeric_div_trunc|numeric_eq|numeric_exp|numeric_fac|numeric_ge|numeric_gt|numeric_in|" +
  1043. "numeric_inc|numeric_larger|numeric_le|numeric_ln|numeric_log|numeric_lt|numeric_mod|" +
  1044. "numeric_mul|numeric_ne|numeric_out|numeric_power|numeric_recv|numeric_send|" +
  1045. "numeric_smaller|numeric_sqrt|numeric_stddev_pop|numeric_stddev_samp|numeric_sub|" +
  1046. "numeric_transform|numeric_uminus|numeric_uplus|numeric_var_pop|numeric_var_samp|" +
  1047. "numerictypmodin|numerictypmodout|numnode|numrange|numrange_subdiff|obj_description|" +
  1048. "octet_length|oid|oideq|oidge|oidgt|oidin|oidlarger|oidle|oidlt|oidne|oidout|oidrecv|oidsend|" +
  1049. "oidsmaller|oidvectoreq|oidvectorge|oidvectorgt|oidvectorin|oidvectorle|oidvectorlt|" +
  1050. "oidvectorne|oidvectorout|oidvectorrecv|oidvectorsend|oidvectortypes|on_pb|on_pl|" +
  1051. "on_ppath|on_ps|on_sb|on_sl|opaque_in|opaque_out|overlaps|overlay|path|path_add|path_add_pt|" +
  1052. "path_center|path_contain_pt|path_distance|path_div_pt|path_in|path_inter|path_length|" +
  1053. "path_mul_pt|path_n_eq|path_n_ge|path_n_gt|path_n_le|path_n_lt|path_npoints|path_out|" +
  1054. "path_recv|path_send|path_sub_pt|pclose|percent_rank|pg_advisory_lock|" +
  1055. "pg_advisory_lock_shared|pg_advisory_unlock|pg_advisory_unlock_all|" +
  1056. "pg_advisory_unlock_shared|pg_advisory_xact_lock|pg_advisory_xact_lock_shared|" +
  1057. "pg_available_extension_versions|pg_available_extensions|pg_backend_pid|" +
  1058. "pg_backup_start_time|pg_cancel_backend|pg_char_to_encoding|pg_client_encoding|" +
  1059. "pg_collation_for|pg_collation_is_visible|pg_column_is_updatable|pg_column_size|" +
  1060. "pg_conf_load_time|pg_conversion_is_visible|pg_create_restore_point|" +
  1061. "pg_current_xlog_insert_location|pg_current_xlog_location|pg_cursor|pg_database_size|" +
  1062. "pg_describe_object|pg_encoding_max_length|pg_encoding_to_char|" +
  1063. "pg_event_trigger_dropped_objects|pg_export_snapshot|pg_extension_config_dump|" +
  1064. "pg_extension_update_paths|pg_function_is_visible|pg_get_constraintdef|pg_get_expr|" +
  1065. "pg_get_function_arguments|pg_get_function_identity_arguments|" +
  1066. "pg_get_function_result|pg_get_functiondef|pg_get_indexdef|pg_get_keywords|" +
  1067. "pg_get_multixact_members|pg_get_ruledef|pg_get_serial_sequence|pg_get_triggerdef|" +
  1068. "pg_get_userbyid|pg_get_viewdef|pg_has_role|pg_identify_object|pg_indexes_size|" +
  1069. "pg_is_in_backup|pg_is_in_recovery|pg_is_other_temp_schema|pg_is_xlog_replay_paused|" +
  1070. "pg_last_xact_replay_timestamp|pg_last_xlog_receive_location|" +
  1071. "pg_last_xlog_replay_location|pg_listening_channels|pg_lock_status|pg_ls_dir|" +
  1072. "pg_my_temp_schema|pg_node_tree_in|pg_node_tree_out|pg_node_tree_recv|" +
  1073. "pg_node_tree_send|pg_notify|pg_opclass_is_visible|pg_operator_is_visible|" +
  1074. "pg_opfamily_is_visible|pg_options_to_table|pg_postmaster_start_time|" +
  1075. "pg_prepared_statement|pg_prepared_xact|pg_read_binary_file|pg_read_file|" +
  1076. "pg_relation_filenode|pg_relation_filepath|pg_relation_is_updatable|pg_relation_size|" +
  1077. "pg_reload_conf|pg_rotate_logfile|pg_sequence_parameters|pg_show_all_settings|" +
  1078. "pg_size_pretty|pg_sleep|pg_start_backup|pg_stat_clear_snapshot|pg_stat_file|" +
  1079. "pg_stat_get_activity|pg_stat_get_analyze_count|pg_stat_get_autoanalyze_count|" +
  1080. "pg_stat_get_autovacuum_count|pg_stat_get_backend_activity|" +
  1081. "pg_stat_get_backend_activity_start|pg_stat_get_backend_client_addr|" +
  1082. "pg_stat_get_backend_client_port|pg_stat_get_backend_dbid|pg_stat_get_backend_idset|" +
  1083. "pg_stat_get_backend_pid|pg_stat_get_backend_start|pg_stat_get_backend_userid|" +
  1084. "pg_stat_get_backend_waiting|pg_stat_get_backend_xact_start|" +
  1085. "pg_stat_get_bgwriter_buf_written_checkpoints|" +
  1086. "pg_stat_get_bgwriter_buf_written_clean|pg_stat_get_bgwriter_maxwritten_clean|" +
  1087. "pg_stat_get_bgwriter_requested_checkpoints|pg_stat_get_bgwriter_stat_reset_time|" +
  1088. "pg_stat_get_bgwriter_timed_checkpoints|pg_stat_get_blocks_fetched|" +
  1089. "pg_stat_get_blocks_hit|pg_stat_get_buf_alloc|pg_stat_get_buf_fsync_backend|" +
  1090. "pg_stat_get_buf_written_backend|pg_stat_get_checkpoint_sync_time|" +
  1091. "pg_stat_get_checkpoint_write_time|pg_stat_get_db_blk_read_time|" +
  1092. "pg_stat_get_db_blk_write_time|pg_stat_get_db_blocks_fetched|" +
  1093. "pg_stat_get_db_blocks_hit|pg_stat_get_db_conflict_all|" +
  1094. "pg_stat_get_db_conflict_bufferpin|pg_stat_get_db_conflict_lock|" +
  1095. "pg_stat_get_db_conflict_snapshot|pg_stat_get_db_conflict_startup_deadlock|" +
  1096. "pg_stat_get_db_conflict_tablespace|pg_stat_get_db_deadlocks|" +
  1097. "pg_stat_get_db_numbackends|pg_stat_get_db_stat_reset_time|" +
  1098. "pg_stat_get_db_temp_bytes|pg_stat_get_db_temp_files|pg_stat_get_db_tuples_deleted|" +
  1099. "pg_stat_get_db_tuples_fetched|pg_stat_get_db_tuples_inserted|" +
  1100. "pg_stat_get_db_tuples_returned|pg_stat_get_db_tuples_updated|" +
  1101. "pg_stat_get_db_xact_commit|pg_stat_get_db_xact_rollback|pg_stat_get_dead_tuples|" +
  1102. "pg_stat_get_function_calls|pg_stat_get_function_self_time|" +
  1103. "pg_stat_get_function_total_time|pg_stat_get_last_analyze_time|" +
  1104. "pg_stat_get_last_autoanalyze_time|pg_stat_get_last_autovacuum_time|" +
  1105. "pg_stat_get_last_vacuum_time|pg_stat_get_live_tuples|pg_stat_get_numscans|" +
  1106. "pg_stat_get_tuples_deleted|pg_stat_get_tuples_fetched|" +
  1107. "pg_stat_get_tuples_hot_updated|pg_stat_get_tuples_inserted|" +
  1108. "pg_stat_get_tuples_returned|pg_stat_get_tuples_updated|pg_stat_get_vacuum_count|" +
  1109. "pg_stat_get_wal_senders|pg_stat_get_xact_blocks_fetched|" +
  1110. "pg_stat_get_xact_blocks_hit|pg_stat_get_xact_function_calls|" +
  1111. "pg_stat_get_xact_function_self_time|pg_stat_get_xact_function_total_time|" +
  1112. "pg_stat_get_xact_numscans|pg_stat_get_xact_tuples_deleted|" +
  1113. "pg_stat_get_xact_tuples_fetched|pg_stat_get_xact_tuples_hot_updated|" +
  1114. "pg_stat_get_xact_tuples_inserted|pg_stat_get_xact_tuples_returned|" +
  1115. "pg_stat_get_xact_tuples_updated|pg_stat_reset|pg_stat_reset_shared|" +
  1116. "pg_stat_reset_single_function_counters|pg_stat_reset_single_table_counters|" +
  1117. "pg_stop_backup|pg_switch_xlog|pg_table_is_visible|pg_table_size|" +
  1118. "pg_tablespace_databases|pg_tablespace_location|pg_tablespace_size|" +
  1119. "pg_terminate_backend|pg_timezone_abbrevs|pg_timezone_names|pg_total_relation_size|" +
  1120. "pg_trigger_depth|pg_try_advisory_lock|pg_try_advisory_lock_shared|" +
  1121. "pg_try_advisory_xact_lock|pg_try_advisory_xact_lock_shared|pg_ts_config_is_visible|" +
  1122. "pg_ts_dict_is_visible|pg_ts_parser_is_visible|pg_ts_template_is_visible|" +
  1123. "pg_type_is_visible|pg_typeof|pg_xlog_location_diff|pg_xlog_replay_pause|" +
  1124. "pg_xlog_replay_resume|pg_xlogfile_name|pg_xlogfile_name_offset|pi|plainto_tsquery|" +
  1125. "plpgsql_call_handler|plpgsql_inline_handler|plpgsql_validator|point|point_above|" +
  1126. "point_add|point_below|point_distance|point_div|point_eq|point_horiz|point_in|point_left|" +
  1127. "point_mul|point_ne|point_out|point_recv|point_right|point_send|point_sub|point_vert|" +
  1128. "poly_above|poly_below|poly_center|poly_contain|poly_contain_pt|poly_contained|" +
  1129. "poly_distance|poly_in|poly_left|poly_npoints|poly_out|poly_overabove|poly_overbelow|" +
  1130. "poly_overlap|poly_overleft|poly_overright|poly_recv|poly_right|poly_same|poly_send|" +
  1131. "polygon|popen|position|positionjoinsel|positionsel|postgresql_fdw_validator|pow|power|" +
  1132. "prsd_end|prsd_headline|prsd_lextype|prsd_nexttoken|prsd_start|pt_contained_circle|" +
  1133. "pt_contained_poly|query_to_xml|query_to_xml_and_xmlschema|query_to_xmlschema|" +
  1134. "querytree|quote_ident|quote_literal|quote_nullable|radians|radius|random|range_adjacent|" +
  1135. "range_after|range_before|range_cmp|range_contained_by|range_contains|" +
  1136. "range_contains_elem|range_eq|range_ge|range_gist_compress|range_gist_consistent|" +
  1137. "range_gist_decompress|range_gist_penalty|range_gist_picksplit|range_gist_same|" +
  1138. "range_gist_union|range_gt|range_in|range_intersect|range_le|range_lt|range_minus|" +
  1139. "range_ne|range_out|range_overlaps|range_overleft|range_overright|range_recv|range_send|" +
  1140. "range_typanalyze|range_union|rangesel|rank|record_eq|record_ge|record_gt|record_in|" +
  1141. "record_le|record_lt|record_ne|record_out|record_recv|record_send|regclass|regclassin|" +
  1142. "regclassout|regclassrecv|regclasssend|regconfigin|regconfigout|regconfigrecv|" +
  1143. "regconfigsend|regdictionaryin|regdictionaryout|regdictionaryrecv|regdictionarysend|" +
  1144. "regexeqjoinsel|regexeqsel|regexnejoinsel|regexnesel|regexp_matches|regexp_replace|" +
  1145. "regexp_split_to_array|regexp_split_to_table|regoperatorin|regoperatorout|" +
  1146. "regoperatorrecv|regoperatorsend|regoperin|regoperout|regoperrecv|regopersend|" +
  1147. "regprocedurein|regprocedureout|regprocedurerecv|regproceduresend|regprocin|regprocout|" +
  1148. "regprocrecv|regprocsend|regr_avgx|regr_avgy|regr_count|regr_intercept|regr_r2|" +
  1149. "regr_slope|regr_sxx|regr_sxy|regr_syy|regtypein|regtypeout|regtyperecv|regtypesend|" +
  1150. "reltime|reltimeeq|reltimege|reltimegt|reltimein|reltimele|reltimelt|reltimene|reltimeout|" +
  1151. "reltimerecv|reltimesend|repeat|replace|reverse|right|round|row_number|row_to_json|rpad|" +
  1152. "rtrim|scalargtjoinsel|scalargtsel|scalarltjoinsel|scalarltsel|schema_to_xml|" +
  1153. "schema_to_xml_and_xmlschema|schema_to_xmlschema|session_user|set_bit|set_byte|" +
  1154. "set_config|set_masklen|setseed|setval|setweight|shell_in|shell_out|" +
  1155. "shift_jis_2004_to_euc_jis_2004|shift_jis_2004_to_utf8|shobj_description|sign|" +
  1156. "similar_escape|sin|sjis_to_euc_jp|sjis_to_mic|sjis_to_utf8|slope|smgreq|smgrin|smgrne|" +
  1157. "smgrout|spg_kd_choose|spg_kd_config|spg_kd_inner_consistent|spg_kd_picksplit|" +
  1158. "spg_quad_choose|spg_quad_config|spg_quad_inner_consistent|spg_quad_leaf_consistent|" +
  1159. "spg_quad_picksplit|spg_range_quad_choose|spg_range_quad_config|" +
  1160. "spg_range_quad_inner_consistent|spg_range_quad_leaf_consistent|" +
  1161. "spg_range_quad_picksplit|spg_text_choose|spg_text_config|spg_text_inner_consistent|" +
  1162. "spg_text_leaf_consistent|spg_text_picksplit|spgbeginscan|spgbuild|spgbuildempty|" +
  1163. "spgbulkdelete|spgcanreturn|spgcostestimate|spgendscan|spggetbitmap|spggettuple|" +
  1164. "spginsert|spgmarkpos|spgoptions|spgrescan|spgrestrpos|spgvacuumcleanup|split_part|sqrt|" +
  1165. "statement_timestamp|stddev|stddev_pop|stddev_samp|string_agg|string_agg_finalfn|" +
  1166. "string_agg_transfn|string_to_array|strip|strpos|substr|substring|sum|" +
  1167. "suppress_redundant_updates_trigger|table_to_xml|table_to_xml_and_xmlschema|" +
  1168. "table_to_xmlschema|tan|text|text_ge|text_gt|text_larger|text_le|text_lt|text_pattern_ge|" +
  1169. "text_pattern_gt|text_pattern_le|text_pattern_lt|text_smaller|textanycat|textcat|texteq|" +
  1170. "texticlike|texticnlike|texticregexeq|texticregexne|textin|textlen|textlike|textne|" +
  1171. "textnlike|textout|textrecv|textregexeq|textregexne|textsend|thesaurus_init|" +
  1172. "thesaurus_lexize|tideq|tidge|tidgt|tidin|tidlarger|tidle|tidlt|tidne|tidout|tidrecv|tidsend|" +
  1173. "tidsmaller|time_cmp|time_eq|time_ge|time_gt|time_hash|time_in|time_larger|time_le|time_lt|" +
  1174. "time_mi_interval|time_mi_time|time_ne|time_out|time_pl_interval|time_recv|time_send|" +
  1175. "time_smaller|time_transform|timedate_pl|timemi|timenow|timeofday|timepl|timestamp_cmp|" +
  1176. "timestamp_cmp_date|timestamp_cmp_timestamptz|timestamp_eq|timestamp_eq_date|" +
  1177. "timestamp_eq_timestamptz|timestamp_ge|timestamp_ge_date|timestamp_ge_timestamptz|" +
  1178. "timestamp_gt|timestamp_gt_date|timestamp_gt_timestamptz|timestamp_hash|timestamp_in|" +
  1179. "timestamp_larger|timestamp_le|timestamp_le_date|timestamp_le_timestamptz|" +
  1180. "timestamp_lt|timestamp_lt_date|timestamp_lt_timestamptz|timestamp_mi|" +
  1181. "timestamp_mi_interval|timestamp_ne|timestamp_ne_date|timestamp_ne_timestamptz|" +
  1182. "timestamp_out|timestamp_pl_interval|timestamp_recv|timestamp_send|timestamp_smaller|" +
  1183. "timestamp_sortsupport|timestamp_transform|timestamptypmodin|timestamptypmodout|" +
  1184. "timestamptz_cmp|timestamptz_cmp_date|timestamptz_cmp_timestamp|timestamptz_eq|" +
  1185. "timestamptz_eq_date|timestamptz_eq_timestamp|timestamptz_ge|timestamptz_ge_date|" +
  1186. "timestamptz_ge_timestamp|timestamptz_gt|timestamptz_gt_date|" +
  1187. "timestamptz_gt_timestamp|timestamptz_in|timestamptz_larger|timestamptz_le|" +
  1188. "timestamptz_le_date|timestamptz_le_timestamp|timestamptz_lt|timestamptz_lt_date|" +
  1189. "timestamptz_lt_timestamp|timestamptz_mi|timestamptz_mi_interval|timestamptz_ne|" +
  1190. "timestamptz_ne_date|timestamptz_ne_timestamp|timestamptz_out|" +
  1191. "timestamptz_pl_interval|timestamptz_recv|timestamptz_send|timestamptz_smaller|" +
  1192. "timestamptztypmodin|timestamptztypmodout|timetypmodin|timetypmodout|timetz_cmp|" +
  1193. "timetz_eq|timetz_ge|timetz_gt|timetz_hash|timetz_in|timetz_larger|timetz_le|timetz_lt|" +
  1194. "timetz_mi_interval|timetz_ne|timetz_out|timetz_pl_interval|timetz_recv|timetz_send|" +
  1195. "timetz_smaller|timetzdate_pl|timetztypmodin|timetztypmodout|timezone|tinterval|" +
  1196. "tintervalct|tintervalend|tintervaleq|tintervalge|tintervalgt|tintervalin|tintervalle|" +
  1197. "tintervalleneq|tintervallenge|tintervallengt|tintervallenle|tintervallenlt|" +
  1198. "tintervallenne|tintervallt|tintervalne|tintervalout|tintervalov|tintervalrecv|" +
  1199. "tintervalrel|tintervalsame|tintervalsend|tintervalstart|to_ascii|to_char|to_date|to_hex|" +
  1200. "to_json|to_number|to_timestamp|to_tsquery|to_tsvector|transaction_timestamp|translate|" +
  1201. "trigger_in|trigger_out|trunc|ts_debug|ts_headline|ts_lexize|ts_match_qv|ts_match_tq|" +
  1202. "ts_match_tt|ts_match_vq|ts_parse|ts_rank|ts_rank_cd|ts_rewrite|ts_stat|ts_token_type|" +
  1203. "ts_typanalyze|tsmatchjoinsel|tsmatchsel|tsq_mcontained|tsq_mcontains|tsquery_and|" +
  1204. "tsquery_cmp|tsquery_eq|tsquery_ge|tsquery_gt|tsquery_le|tsquery_lt|tsquery_ne|" +
  1205. "tsquery_not|tsquery_or|tsqueryin|tsqueryout|tsqueryrecv|tsquerysend|tsrange|" +
  1206. "tsrange_subdiff|tstzrange|tstzrange_subdiff|tsvector_cmp|tsvector_concat|tsvector_eq|" +
  1207. "tsvector_ge|tsvector_gt|tsvector_le|tsvector_lt|tsvector_ne|tsvector_update_trigger|" +
  1208. "tsvector_update_trigger_column|tsvectorin|tsvectorout|tsvectorrecv|tsvectorsend|" +
  1209. "txid_current|txid_current_snapshot|txid_snapshot_in|txid_snapshot_out|" +
  1210. "txid_snapshot_recv|txid_snapshot_send|txid_snapshot_xip|txid_snapshot_xmax|" +
  1211. "txid_snapshot_xmin|txid_visible_in_snapshot|uhc_to_utf8|unique_key_recheck|unknownin|" +
  1212. "unknownout|unknownrecv|unknownsend|unnest|upper|upper_inc|upper_inf|utf8_to_ascii|" +
  1213. "utf8_to_big5|utf8_to_euc_cn|utf8_to_euc_jis_2004|utf8_to_euc_jp|utf8_to_euc_kr|" +
  1214. "utf8_to_euc_tw|utf8_to_gb18030|utf8_to_gbk|utf8_to_iso8859|utf8_to_iso8859_1|" +
  1215. "utf8_to_johab|utf8_to_koi8r|utf8_to_koi8u|utf8_to_shift_jis_2004|utf8_to_sjis|" +
  1216. "utf8_to_uhc|utf8_to_win|uuid_cmp|uuid_eq|uuid_ge|uuid_gt|uuid_hash|uuid_in|uuid_le|" +
  1217. "uuid_lt|uuid_ne|uuid_out|uuid_recv|uuid_send|var_pop|var_samp|varbit_in|varbit_out|" +
  1218. "varbit_recv|varbit_send|varbit_transform|varbitcmp|varbiteq|varbitge|varbitgt|varbitle|" +
  1219. "varbitlt|varbitne|varbittypmodin|varbittypmodout|varchar_transform|varcharin|" +
  1220. "varcharout|varcharrecv|varcharsend|varchartypmodin|varchartypmodout|variance|version|" +
  1221. "void_in|void_out|void_recv|void_send|width|width_bucket|win1250_to_latin2|" +
  1222. "win1250_to_mic|win1251_to_iso|win1251_to_koi8r|win1251_to_mic|win1251_to_win866|" +
  1223. "win866_to_iso|win866_to_koi8r|win866_to_mic|win866_to_win1251|win_to_utf8|xideq|" +
  1224. "xideqint4|xidin|xidout|xidrecv|xidsend|xml|xml_in|xml_is_well_formed|" +
  1225. "xml_is_well_formed_content|xml_is_well_formed_document|xml_out|xml_recv|xml_send|" +
  1226. "xmlagg|xmlcomment|xmlconcat2|xmlexists|xmlvalidate|xpath|xpath_exists"
  1227. );
  1228. var keywordMapper = this.createKeywordMapper({
  1229. "support.function": builtinFunctions,
  1230. "keyword": keywords
  1231. }, "identifier", true);
  1232. var sqlRules = [{
  1233. token : "string", // single line string -- assume dollar strings if multi-line for now
  1234. regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
  1235. }, {
  1236. token : "variable.language", // pg identifier
  1237. regex : '".*?"'
  1238. }, {
  1239. token : "constant.numeric", // float
  1240. regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
  1241. }, {
  1242. token : keywordMapper,
  1243. regex : "[a-zA-Z_][a-zA-Z0-9_$]*\\b" // TODO - Unicode in identifiers
  1244. }, {
  1245. token : "keyword.operator",
  1246. regex : "!|!!|!~|!~\\*|!~~|!~~\\*|#|##|#<|#<=|#<>|#=|#>|#>=|%|\\&|\\&\\&|\\&<|\\&<\\||\\&>|\\*|\\+|" +
  1247. "\\-|/|<|<#>|<\\->|<<|<<=|<<\\||<=|<>|<\\?>|<@|<\\^|=|>|>=|>>|>>=|>\\^|\\?#|\\?\\-|\\?\\-\\||" +
  1248. "\\?\\||\\?\\|\\||@|@\\-@|@>|@@|@@@|\\^|\\||\\|\\&>|\\|/|\\|>>|\\|\\||\\|\\|/|~|~\\*|~<=~|~<~|" +
  1249. "~=|~>=~|~>~|~~|~~\\*"
  1250. }, {
  1251. token : "paren.lparen",
  1252. regex : "[\\(]"
  1253. }, {
  1254. token : "paren.rparen",
  1255. regex : "[\\)]"
  1256. }, {
  1257. token : "text",
  1258. regex : "\\s+"
  1259. }
  1260. ];
  1261. this.$rules = {
  1262. "start" : [{
  1263. token : "comment",
  1264. regex : "--.*$"
  1265. },
  1266. DocCommentHighlightRules.getStartRule("doc-start"),
  1267. {
  1268. token : "comment", // multi-line comment
  1269. regex : "\\/\\*",
  1270. next : "comment"
  1271. },{
  1272. token : "keyword.statementBegin",
  1273. regex : "^[a-zA-Z]+", // Could enumerate starting keywords but this allows things to work when new statements are added.
  1274. next : "statement"
  1275. },{
  1276. token : "support.buildin", // psql directive
  1277. regex : "^\\\\[\\S]+.*$"
  1278. }
  1279. ],
  1280. "statement" : [{
  1281. token : "comment",
  1282. regex : "--.*$"
  1283. }, {
  1284. token : "comment", // multi-line comment
  1285. regex : "\\/\\*",
  1286. next : "commentStatement"
  1287. }, {
  1288. token : "statementEnd",
  1289. regex : ";",
  1290. next : "start"
  1291. }, {
  1292. token : "string",
  1293. regex : "\\$perl\\$",
  1294. next : "perl-start"
  1295. }, {
  1296. token : "string",
  1297. regex : "\\$python\\$",
  1298. next : "python-start"
  1299. }, {
  1300. token : "string",
  1301. regex : "\\$json\\$",
  1302. next : "json-start"
  1303. }, {
  1304. token : "string",
  1305. regex : "\\$(js|javascript)\\$",
  1306. next : "javascript-start"
  1307. }, {
  1308. token : "string",
  1309. regex : "\\$[\\w_0-9]*\\$$", // dollar quote at the end of a line
  1310. next : "dollarSql"
  1311. }, {
  1312. token : "string",
  1313. regex : "\\$[\\w_0-9]*\\$",
  1314. next : "dollarStatementString"
  1315. }
  1316. ].concat(sqlRules),
  1317. "dollarSql" : [{
  1318. token : "comment",
  1319. regex : "--.*$"
  1320. }, {
  1321. token : "comment", // multi-line comment
  1322. regex : "\\/\\*",
  1323. next : "commentDollarSql"
  1324. }, {
  1325. token : "string", // end quoting with dollar at the start of a line
  1326. regex : "^\\$[\\w_0-9]*\\$",
  1327. next : "statement"
  1328. }, {
  1329. token : "string",
  1330. regex : "\\$[\\w_0-9]*\\$",
  1331. next : "dollarSqlString"
  1332. }
  1333. ].concat(sqlRules),
  1334. "comment" : [{
  1335. token : "comment", // closing comment
  1336. regex : ".*?\\*\\/",
  1337. next : "start"
  1338. }, {
  1339. token : "comment", // comment spanning whole line
  1340. regex : ".+"
  1341. }
  1342. ],
  1343. "commentStatement" : [{
  1344. token : "comment", // closing comment
  1345. regex : ".*?\\*\\/",
  1346. next : "statement"
  1347. }, {
  1348. token : "comment", // comment spanning whole line
  1349. regex : ".+"
  1350. }
  1351. ],
  1352. "commentDollarSql" : [{
  1353. token : "comment", // closing comment
  1354. regex : ".*?\\*\\/",
  1355. next : "dollarSql"
  1356. }, {
  1357. token : "comment", // comment spanning whole line
  1358. regex : ".+"
  1359. }
  1360. ],
  1361. "dollarStatementString" : [{
  1362. token : "string", // closing dollarstring
  1363. regex : ".*?\\$[\\w_0-9]*\\$",
  1364. next : "statement"
  1365. }, {
  1366. token : "string", // dollarstring spanning whole line
  1367. regex : ".+"
  1368. }
  1369. ],
  1370. "dollarSqlString" : [{
  1371. token : "string", // closing dollarstring
  1372. regex : ".*?\\$[\\w_0-9]*\\$",
  1373. next : "dollarSql"
  1374. }, {
  1375. token : "string", // dollarstring spanning whole line
  1376. regex : ".+"
  1377. }
  1378. ]
  1379. };
  1380. this.embedRules(DocCommentHighlightRules, "doc-", [ DocCommentHighlightRules.getEndRule("start") ]);
  1381. this.embedRules(PerlHighlightRules, "perl-", [{token : "string", regex : "\\$perl\\$", next : "statement"}]);
  1382. this.embedRules(PythonHighlightRules, "python-", [{token : "string", regex : "\\$python\\$", next : "statement"}]);
  1383. this.embedRules(JsonHighlightRules, "json-", [{token : "string", regex : "\\$json\\$", next : "statement"}]);
  1384. this.embedRules(JavaScriptHighlightRules, "javascript-", [{token : "string", regex : "\\$(js|javascript)\\$", next : "statement"}]);
  1385. };
  1386. oop.inherits(PgsqlHighlightRules, TextHighlightRules);
  1387. exports.PgsqlHighlightRules = PgsqlHighlightRules;
  1388. });
  1389. ace.define("ace/mode/pgsql",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/pgsql_highlight_rules"], function(require, exports, module) {
  1390. var oop = require("../lib/oop");
  1391. var TextMode = require("../mode/text").Mode;
  1392. var PgsqlHighlightRules = require("./pgsql_highlight_rules").PgsqlHighlightRules;
  1393. var Mode = function() {
  1394. this.HighlightRules = PgsqlHighlightRules;
  1395. this.$behaviour = this.$defaultBehaviour;
  1396. };
  1397. oop.inherits(Mode, TextMode);
  1398. (function() {
  1399. this.lineCommentStart = "--";
  1400. this.blockComment = {start: "/*", end: "*/"};
  1401. this.getNextLineIndent = function(state, line, tab) {
  1402. if (state == "start" || state == "keyword.statementEnd") {
  1403. return "";
  1404. } else {
  1405. return this.$getIndent(line); // Keep whatever indent the previous line has
  1406. }
  1407. };
  1408. this.$id = "ace/mode/pgsql";
  1409. }).call(Mode.prototype);
  1410. exports.Mode = Mode;
  1411. });