main
Last change
on this file since 65b6638 was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago |
Initial commit
|
-
Property mode
set to
100644
|
File size:
1.5 KB
|
Line | |
---|
1 | /*
|
---|
2 | Language: Q
|
---|
3 | Description: Q is a vector-based functional paradigm programming language built into the kdb+ database.
|
---|
4 | (K/Q/Kdb+ from Kx Systems)
|
---|
5 | Author: Sergey Vidyuk <svidyuk@gmail.com>
|
---|
6 | Website: https://kx.com/connect-with-us/developers/
|
---|
7 | */
|
---|
8 |
|
---|
9 | function q(hljs) {
|
---|
10 | const KEYWORDS = {
|
---|
11 | $pattern: /(`?)[A-Za-z0-9_]+\b/,
|
---|
12 | keyword:
|
---|
13 | 'do while select delete by update from',
|
---|
14 | literal:
|
---|
15 | '0b 1b',
|
---|
16 | built_in:
|
---|
17 | 'neg not null string reciprocal floor ceiling signum mod xbar xlog and or each scan over prior mmu lsq inv md5 ltime gtime count first var dev med cov cor all any rand sums prds mins maxs fills deltas ratios avgs differ prev next rank reverse iasc idesc asc desc msum mcount mavg mdev xrank mmin mmax xprev rotate distinct group where flip type key til get value attr cut set upsert raze union inter except cross sv vs sublist enlist read0 read1 hopen hclose hdel hsym hcount peach system ltrim rtrim trim lower upper ssr view tables views cols xcols keys xkey xcol xasc xdesc fkeys meta lj aj aj0 ij pj asof uj ww wj wj1 fby xgroup ungroup ej save load rsave rload show csv parse eval min max avg wavg wsum sin cos tan sum',
|
---|
18 | type:
|
---|
19 | '`float `double int `timestamp `timespan `datetime `time `boolean `symbol `char `byte `short `long `real `month `date `minute `second `guid'
|
---|
20 | };
|
---|
21 |
|
---|
22 | return {
|
---|
23 | name: 'Q',
|
---|
24 | aliases: [
|
---|
25 | 'k',
|
---|
26 | 'kdb'
|
---|
27 | ],
|
---|
28 | keywords: KEYWORDS,
|
---|
29 | contains: [
|
---|
30 | hljs.C_LINE_COMMENT_MODE,
|
---|
31 | hljs.QUOTE_STRING_MODE,
|
---|
32 | hljs.C_NUMBER_MODE
|
---|
33 | ]
|
---|
34 | };
|
---|
35 | }
|
---|
36 |
|
---|
37 | module.exports = q;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.