dolphindb 2.0.1007 → 2.0.1008

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/language.js CHANGED
@@ -248,620 +248,625 @@ export const constants = [
248
248
  'False',
249
249
  'None',
250
250
  ];
251
- export const tm_language = {
252
- $schema: 'https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json',
253
- name: 'DolphinDB',
254
- scopeName: 'source.dolphindb',
255
- patterns: [
256
- {
257
- match: '\\.\\.\\.',
258
- name: 'invalid.ellipsis.dolphindb'
259
- },
260
- {
261
- include: '#keyword'
262
- },
263
- {
264
- include: '#literal'
265
- },
266
- {
267
- include: '#comment'
268
- },
269
- {
270
- include: '#decorator'
271
- },
272
- {
273
- include: '#variable'
274
- },
275
- {
276
- include: '#operator'
277
- },
278
- {
279
- include: '#method_call'
280
- },
281
- {
282
- include: '#function_call'
283
- },
284
- {
285
- include: '#property'
286
- },
287
- {
288
- match: ';',
289
- name: 'punctuation.terminator.statement.dolphindb'
290
- },
291
- {
292
- match: ',',
293
- name: 'punctuation.separator.commma.dolphindb'
294
- }
295
- ],
296
- repository: {
297
- keyword: {
298
- // \b: word boundary
299
- // (?<![.$]): boundary 不是 . 或 $
300
- // ?!\s*: 不是 label
301
- match: `\\b(?<![.$])(${keywords.join('|')})(?!(\\s*:|\\())\\b`,
302
- name: 'keyword.control.dolphindb'
303
- },
304
- literal: {
305
- patterns: [
306
- { include: '#constant' },
307
- { include: '#datetime' },
308
- { include: '#string' },
309
- { include: '#number' },
310
- ]
311
- },
312
- constant: {
313
- match: `\\b(?<![.$])(${constants.join('|')})(?!\\s*:)\\b`,
314
- name: 'constant.language.int.dolphindb'
315
- },
316
- decorator: {
317
- match: '^@testing',
318
- name: 'meta.decorator.dolphindb',
319
- },
320
- datetime: {
321
- patterns: [
322
- {
323
- match: '\\b[0-9]{4}[.][0-9]{2}[.][0-9]{2}[T ][0-9]{2}:[0-9]{2}:[0-9]{2}([.][0-9]{3,9})?\\b',
324
- name: 'constant.numeric.datetime.datetime.dolphindb',
325
- },
326
- {
327
- match: '\\b[0-9]{4}\\.[0-9]{2}M\\b',
328
- name: 'constant.numeric.datetime.month.dolphindb',
329
- },
330
- {
331
- match: '\\b[0-9]{4}\\.[0-9]{2}\\.[0-9]{2}\\b',
332
- name: 'constant.numeric.datetime.date.dolphindb',
333
- },
334
- {
335
- match: '\\b[0-9]{2}:[0-9]{2}:[0-9]{2}([.][0-9]{3,9})?\\b',
336
- name: 'constant.numeric.datetime.time.dolphindb',
337
- },
338
- {
339
- match: '\\b[0-9]{2}:[0-9]{2}m\\b',
340
- name: 'constant.numeric.datetime.minute.dolphindb',
341
- },
342
- ]
343
- },
344
- string: {
345
- patterns: [
346
- {
347
- include: '#string_single_quoted'
348
- },
349
- {
350
- include: '#string_double_quoted'
351
- },
352
- {
353
- begin: "'''",
354
- beginCaptures: {
355
- 0: {
356
- name: 'punctuation.definition.string.begin.dolphindb'
357
- }
251
+ function get_tm_language(python = false) {
252
+ return {
253
+ $schema: 'https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json',
254
+ name: python ? 'DolphinDB Python' : 'DolphinDB',
255
+ scopeName: python ? 'source.dolphindb-python' : 'source.dolphindb',
256
+ patterns: [
257
+ {
258
+ match: '\\.\\.\\.',
259
+ name: 'invalid.ellipsis.dolphindb'
260
+ },
261
+ {
262
+ include: '#keyword'
263
+ },
264
+ {
265
+ include: '#literal'
266
+ },
267
+ {
268
+ include: '#comment'
269
+ },
270
+ {
271
+ include: '#decorator'
272
+ },
273
+ {
274
+ include: '#variable'
275
+ },
276
+ {
277
+ include: '#operator'
278
+ },
279
+ {
280
+ include: '#method_call'
281
+ },
282
+ {
283
+ include: '#function_call'
284
+ },
285
+ {
286
+ include: '#property'
287
+ },
288
+ {
289
+ match: ';',
290
+ name: 'punctuation.terminator.statement.dolphindb'
291
+ },
292
+ {
293
+ match: ',',
294
+ name: 'punctuation.separator.commma.dolphindb'
295
+ }
296
+ ],
297
+ repository: {
298
+ keyword: {
299
+ // \b: word boundary
300
+ // (?<![.$]): boundary 不是 . 或 $
301
+ // ?!\s*: 不是 label
302
+ match: `\\b(?<![.$])(${keywords.join('|')})(?!(\\s*:|\\())\\b`,
303
+ name: 'keyword.control.dolphindb'
304
+ },
305
+ literal: {
306
+ patterns: [
307
+ { include: '#constant' },
308
+ { include: '#datetime' },
309
+ { include: '#string' },
310
+ { include: '#number' },
311
+ ]
312
+ },
313
+ constant: {
314
+ match: `\\b(?<![.$])(${constants.join('|')})(?!\\s*:)\\b`,
315
+ name: 'constant.language.int.dolphindb'
316
+ },
317
+ decorator: {
318
+ match: '^@testing',
319
+ name: 'meta.decorator.dolphindb',
320
+ },
321
+ datetime: {
322
+ patterns: [
323
+ {
324
+ match: '\\b[0-9]{4}[.][0-9]{2}[.][0-9]{2}[T ][0-9]{2}:[0-9]{2}:[0-9]{2}([.][0-9]{3,9})?\\b',
325
+ name: 'constant.numeric.datetime.datetime.dolphindb',
358
326
  },
359
- end: "'''",
360
- endCaptures: {
361
- 0: {
362
- name: 'punctuation.definition.string.end.dolphindb'
363
- }
327
+ {
328
+ match: '\\b[0-9]{4}\\.[0-9]{2}M\\b',
329
+ name: 'constant.numeric.datetime.month.dolphindb',
364
330
  },
365
- name: 'string.quoted.single.heredoc.dolphindb',
366
- patterns: [
367
- {
368
- captures: {
369
- 1: {
370
- name: 'punctuation.definition.escape.backslash.dolphindb'
371
- }
372
- },
373
- match: '(\\\\).',
374
- name: 'constant.character.escape.backslash.dolphindb'
375
- }
376
- ]
377
- },
378
- {
379
- begin: '"""',
380
- beginCaptures: {
381
- 0: {
382
- name: 'punctuation.definition.string.begin.dolphindb'
383
- }
331
+ {
332
+ match: '\\b[0-9]{4}\\.[0-9]{2}\\.[0-9]{2}\\b',
333
+ name: 'constant.numeric.datetime.date.dolphindb',
384
334
  },
385
- end: '"""',
386
- endCaptures: {
387
- 0: {
388
- name: 'punctuation.definition.string.end.dolphindb'
389
- }
335
+ {
336
+ match: '\\b[0-9]{2}:[0-9]{2}:[0-9]{2}([.][0-9]{3,9})?\\b',
337
+ name: 'constant.numeric.datetime.time.dolphindb',
390
338
  },
391
- name: 'string.quoted.double.heredoc.dolphindb',
392
- patterns: [
393
- {
394
- captures: {
395
- 1: {
396
- name: 'punctuation.definition.escape.backslash.dolphindb'
397
- }
398
- },
399
- match: '(\\\\).',
400
- name: 'constant.character.escape.backslash.dolphindb'
401
- },
402
- {
403
- include: '#interpolated_dolphindb'
404
- }
405
- ]
406
- },
407
- {
408
- match: '`[\\w\\.]*',
409
- name: 'string.quoted.other.dolphindb'
410
- }
411
- ]
412
- },
413
- number: {
414
- patterns: [
415
- {
416
- match: '\\b[01]+[bB]\\b',
417
- name: 'constant.numeric.binary.dolphindb'
418
- },
419
- {
420
- // 97c
421
- match: '\\b[0-9]+([clhsmyM]|ms)\\b',
422
- name: 'constant.numeric.dolphindb'
423
- },
424
- {
425
- // 1.2f, 1f
426
- match: '\\b[0-9]+(\\.[0-9]+)?f\\b',
427
- name: 'constant.numeric.dolphindb'
428
- },
429
- {
430
- match: '(?x)\n' +
431
- '(?:\n' +
432
- ' (?:\\b[0-9]+(\\.)[0-9]+[eE][+-]?[0-9]+\\b)| # 1.1E+3\n' +
433
- ' (?:\\b[0-9]+(\\.)[eE][+-]?[0-9]+\\b)| # 1.E+3\n' +
434
- ' (?:\\b(\\.)[0-9]+[eE][+-]?[0-9]+\\b)| # .1E+3\n' +
435
- ' (?:\\b[0-9]+[eE][+-]?[0-9]+\\b)| # 1E+3\n' +
436
- ' (?:\\b[0-9]+(\\.)[0-9]+\\b)| # 1.1\n' +
437
- ' (?:\\b[0-9]+(?=\\.{2,3}))| # 1 followed by a slice\n' +
438
- ' (?:\\b[0-9]+(\\.)\\b)| # 1.\n' +
439
- ' (?:\\b(\\.)[0-9]+\\b)| # .1\n' +
440
- ' (?:\\b[0-9]+\\b(?!\\.)) # 1\n' +
441
- ')\n',
442
- captures: {
443
- 0: {
444
- name: 'constant.numeric.decimal.dolphindb'
445
- },
446
- 1: {
447
- name: 'punctuation.separator.decimal.period.dolphindb'
448
- },
449
- 2: {
450
- name: 'punctuation.separator.decimal.period.dolphindb'
339
+ {
340
+ match: '\\b[0-9]{2}:[0-9]{2}m\\b',
341
+ name: 'constant.numeric.datetime.minute.dolphindb',
342
+ },
343
+ ]
344
+ },
345
+ string: {
346
+ patterns: [
347
+ {
348
+ include: '#string_single_quoted'
349
+ },
350
+ {
351
+ include: '#string_double_quoted'
352
+ },
353
+ {
354
+ begin: "'''",
355
+ beginCaptures: {
356
+ 0: {
357
+ name: 'punctuation.definition.string.begin.dolphindb'
358
+ }
451
359
  },
452
- 3: {
453
- name: 'punctuation.separator.decimal.period.dolphindb'
360
+ end: "'''",
361
+ endCaptures: {
362
+ 0: {
363
+ name: 'punctuation.definition.string.end.dolphindb'
364
+ }
454
365
  },
455
- 4: {
456
- name: 'punctuation.separator.decimal.period.dolphindb'
366
+ name: 'string.quoted.single.heredoc.dolphindb',
367
+ patterns: [
368
+ {
369
+ captures: {
370
+ 1: {
371
+ name: 'punctuation.definition.escape.backslash.dolphindb'
372
+ }
373
+ },
374
+ match: '(\\\\).',
375
+ name: 'constant.character.escape.backslash.dolphindb'
376
+ }
377
+ ]
378
+ },
379
+ {
380
+ begin: '"""',
381
+ beginCaptures: {
382
+ 0: {
383
+ name: 'punctuation.definition.string.begin.dolphindb'
384
+ }
457
385
  },
458
- 5: {
459
- name: 'punctuation.separator.decimal.period.dolphindb'
386
+ end: '"""',
387
+ endCaptures: {
388
+ 0: {
389
+ name: 'punctuation.definition.string.end.dolphindb'
390
+ }
460
391
  },
461
- 6: {
462
- name: 'punctuation.separator.decimal.period.dolphindb'
463
- }
392
+ name: 'string.quoted.double.heredoc.dolphindb',
393
+ patterns: [
394
+ {
395
+ captures: {
396
+ 1: {
397
+ name: 'punctuation.definition.escape.backslash.dolphindb'
398
+ }
399
+ },
400
+ match: '(\\\\).',
401
+ name: 'constant.character.escape.backslash.dolphindb'
402
+ },
403
+ {
404
+ include: '#interpolated_dolphindb'
405
+ }
406
+ ]
407
+ },
408
+ {
409
+ match: '`[\\w\\.]*',
410
+ name: 'string.quoted.other.dolphindb'
464
411
  }
465
- },
466
- ]
467
- },
468
- string_single_quoted: {
469
- patterns: [
470
- {
471
- begin: "'",
472
- beginCaptures: {
473
- 0: {
474
- name: 'punctuation.definition.string.begin.dolphindb'
475
- }
412
+ ]
413
+ },
414
+ number: {
415
+ patterns: [
416
+ {
417
+ match: '\\b[01]+[bB]\\b',
418
+ name: 'constant.numeric.binary.dolphindb'
476
419
  },
477
- end: "'",
478
- endCaptures: {
479
- 0: {
480
- name: 'punctuation.definition.string.end.dolphindb'
481
- }
420
+ {
421
+ // 97c
422
+ match: '\\b[0-9]+([clhsmyM]|ms)\\b',
423
+ name: 'constant.numeric.dolphindb'
482
424
  },
483
- name: 'string.quoted.single.dolphindb',
484
- patterns: [
485
- {
486
- captures: {
487
- 1: {
488
- name: 'punctuation.definition.escape.backslash.dolphindb'
489
- }
425
+ {
426
+ // 1.2f, 1f
427
+ match: '\\b[0-9]+(\\.[0-9]+)?f\\b',
428
+ name: 'constant.numeric.dolphindb'
429
+ },
430
+ {
431
+ match: '(?x)\n' +
432
+ '(?:\n' +
433
+ ' (?:\\b[0-9]+(\\.)[0-9]+[eE][+-]?[0-9]+\\b)| # 1.1E+3\n' +
434
+ ' (?:\\b[0-9]+(\\.)[eE][+-]?[0-9]+\\b)| # 1.E+3\n' +
435
+ ' (?:\\b(\\.)[0-9]+[eE][+-]?[0-9]+\\b)| # .1E+3\n' +
436
+ ' (?:\\b[0-9]+[eE][+-]?[0-9]+\\b)| # 1E+3\n' +
437
+ ' (?:\\b[0-9]+(\\.)[0-9]+\\b)| # 1.1\n' +
438
+ ' (?:\\b[0-9]+(?=\\.{2,3}))| # 1 followed by a slice\n' +
439
+ ' (?:\\b[0-9]+(\\.)\\b)| # 1.\n' +
440
+ ' (?:\\b(\\.)[0-9]+\\b)| # .1\n' +
441
+ ' (?:\\b[0-9]+\\b(?!\\.)) # 1\n' +
442
+ ')\n',
443
+ captures: {
444
+ 0: {
445
+ name: 'constant.numeric.decimal.dolphindb'
490
446
  },
491
- match: '(\\\\)(x[0-9A-Fa-f]{2}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)',
492
- name: 'constant.character.escape.backslash.dolphindb'
493
- }
494
- ]
495
- }
496
- ]
497
- },
498
- string_double_quoted: {
499
- patterns: [
500
- {
501
- begin: '"',
502
- beginCaptures: {
503
- 0: {
504
- name: 'punctuation.definition.string.begin.dolphindb'
447
+ 1: {
448
+ name: 'punctuation.separator.decimal.period.dolphindb'
449
+ },
450
+ 2: {
451
+ name: 'punctuation.separator.decimal.period.dolphindb'
452
+ },
453
+ 3: {
454
+ name: 'punctuation.separator.decimal.period.dolphindb'
455
+ },
456
+ 4: {
457
+ name: 'punctuation.separator.decimal.period.dolphindb'
458
+ },
459
+ 5: {
460
+ name: 'punctuation.separator.decimal.period.dolphindb'
461
+ },
462
+ 6: {
463
+ name: 'punctuation.separator.decimal.period.dolphindb'
464
+ }
505
465
  }
506
466
  },
507
- end: '"',
508
- endCaptures: {
509
- 0: {
510
- name: 'punctuation.definition.string.end.dolphindb'
511
- }
467
+ ]
468
+ },
469
+ string_single_quoted: {
470
+ patterns: [
471
+ {
472
+ begin: "'",
473
+ beginCaptures: {
474
+ 0: {
475
+ name: 'punctuation.definition.string.begin.dolphindb'
476
+ }
477
+ },
478
+ end: "'",
479
+ endCaptures: {
480
+ 0: {
481
+ name: 'punctuation.definition.string.end.dolphindb'
482
+ }
483
+ },
484
+ name: 'string.quoted.single.dolphindb',
485
+ patterns: [
486
+ {
487
+ captures: {
488
+ 1: {
489
+ name: 'punctuation.definition.escape.backslash.dolphindb'
490
+ }
491
+ },
492
+ match: '(\\\\)(x[0-9A-Fa-f]{2}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)',
493
+ name: 'constant.character.escape.backslash.dolphindb'
494
+ }
495
+ ]
496
+ }
497
+ ]
498
+ },
499
+ string_double_quoted: {
500
+ patterns: [
501
+ {
502
+ begin: '"',
503
+ beginCaptures: {
504
+ 0: {
505
+ name: 'punctuation.definition.string.begin.dolphindb'
506
+ }
507
+ },
508
+ end: '"',
509
+ endCaptures: {
510
+ 0: {
511
+ name: 'punctuation.definition.string.end.dolphindb'
512
+ }
513
+ },
514
+ name: 'string.quoted.double.dolphindb',
515
+ patterns: [
516
+ {
517
+ captures: {
518
+ 1: {
519
+ name: 'punctuation.definition.escape.backslash.dolphindb'
520
+ }
521
+ },
522
+ match: '(\\\\)(x[0-9A-Fa-f]{2}|[0-2][0-7]{0,2}|3[0-6][0-7]|37[0-7]?|[4-7][0-7]?|.)',
523
+ name: 'constant.character.escape.backslash.dolphindb'
524
+ },
525
+ {
526
+ include: '#interpolated_dolphindb'
527
+ }
528
+ ]
529
+ }
530
+ ]
531
+ },
532
+ function_call: {
533
+ patterns: [
534
+ {
535
+ begin: '(@)?([\\w$]+!?)\\s*(?=\\()',
536
+ beginCaptures: {
537
+ 1: {
538
+ name: 'variable.other.readwrite.instance.dolphindb'
539
+ },
540
+ 2: {
541
+ patterns: [
542
+ {
543
+ include: '#function_name'
544
+ }
545
+ ]
546
+ }
547
+ },
548
+ end: '(?<=\\))',
549
+ name: 'meta.function-call.dolphindb',
550
+ patterns: [
551
+ {
552
+ include: '#arguments'
553
+ }
554
+ ]
555
+ }
556
+ ]
557
+ },
558
+ function_name: {
559
+ patterns: [
560
+ {
561
+ match: '[a-zA-Z_$][\\w$]*',
562
+ name: 'entity.name.function.dolphindb'
512
563
  },
513
- name: 'string.quoted.double.dolphindb',
514
- patterns: [
515
- {
516
- captures: {
517
- 1: {
518
- name: 'punctuation.definition.escape.backslash.dolphindb'
564
+ {
565
+ match: '\\d[\\w$]*',
566
+ name: 'invalid.illegal.identifier.dolphindb'
567
+ }
568
+ ]
569
+ },
570
+ function_params: {
571
+ patterns: [
572
+ {
573
+ begin: '\\(',
574
+ beginCaptures: {
575
+ 0: {
576
+ name: 'punctuation.definition.parameters.begin.bracket.round.dolphindb'
577
+ }
578
+ },
579
+ end: '\\)',
580
+ endCaptures: {
581
+ 0: {
582
+ name: 'punctuation.definition.parameters.end.bracket.round.dolphindb'
583
+ }
584
+ },
585
+ name: 'meta.parameters.dolphindb',
586
+ patterns: [
587
+ {
588
+ include: '#variable'
589
+ },
590
+ {
591
+ match: '(@(?:[a-zA-Z_$][\\w$]*)?)(\\.\\.\\.)?',
592
+ captures: {
593
+ 1: {
594
+ name: 'variable.parameter.function.readwrite.instance.dolphindb'
595
+ },
596
+ 2: {
597
+ name: 'keyword.operator.splat.dolphindb'
598
+ }
519
599
  }
520
600
  },
521
- match: '(\\\\)(x[0-9A-Fa-f]{2}|[0-2][0-7]{0,2}|3[0-6][0-7]|37[0-7]?|[4-7][0-7]?|.)',
522
- name: 'constant.character.escape.backslash.dolphindb'
601
+ {
602
+ include: '$self'
603
+ }
604
+ ]
605
+ }
606
+ ]
607
+ },
608
+ comment: {
609
+ patterns: python ? [
610
+ {
611
+ begin: '#',
612
+ beginCaptures: {
613
+ 0: {
614
+ name: 'punctuation.definition.comment.dolphindb'
615
+ }
523
616
  },
524
- {
525
- include: '#interpolated_dolphindb'
526
- }
527
- ]
528
- }
529
- ]
530
- },
531
- function_call: {
532
- patterns: [
533
- {
534
- begin: '(@)?([\\w$]+!?)\\s*(?=\\()',
535
- beginCaptures: {
536
- 1: {
537
- name: 'variable.other.readwrite.instance.dolphindb'
617
+ end: '$',
618
+ name: 'comment.line.number-sign.dolphindb'
619
+ }
620
+ ] : [
621
+ {
622
+ begin: '/\\*',
623
+ beginCaptures: {
624
+ 0: {
625
+ name: 'punctuation.definition.comment.dolphindb'
626
+ }
538
627
  },
539
- 2: {
540
- patterns: [
541
- {
542
- include: '#function_name'
543
- }
544
- ]
545
- }
546
- },
547
- end: '(?<=\\))',
548
- name: 'meta.function-call.dolphindb',
549
- patterns: [
550
- {
551
- include: '#arguments'
552
- }
553
- ]
554
- }
555
- ]
556
- },
557
- function_name: {
558
- patterns: [
559
- {
560
- match: '[a-zA-Z_$][\\w$]*',
561
- name: 'entity.name.function.dolphindb'
562
- },
563
- {
564
- match: '\\d[\\w$]*',
565
- name: 'invalid.illegal.identifier.dolphindb'
566
- }
567
- ]
568
- },
569
- function_params: {
570
- patterns: [
571
- {
572
- begin: '\\(',
573
- beginCaptures: {
574
- 0: {
575
- name: 'punctuation.definition.parameters.begin.bracket.round.dolphindb'
576
- }
628
+ end: '\\*/',
629
+ endCaptures: {
630
+ 0: {
631
+ name: 'punctuation.definition.comment.dolphindb'
632
+ }
633
+ },
634
+ name: 'comment.block.dolphindb'
577
635
  },
578
- end: '\\)',
579
- endCaptures: {
580
- 0: {
581
- name: 'punctuation.definition.parameters.end.bracket.round.dolphindb'
582
- }
636
+ {
637
+ begin: '//',
638
+ beginCaptures: {
639
+ 0: {
640
+ name: 'punctuation.definition.comment.dolphindb'
641
+ }
642
+ },
643
+ end: '$',
644
+ name: 'comment.line.number-sign.dolphindb'
583
645
  },
584
- name: 'meta.parameters.dolphindb',
585
- patterns: [
586
- {
587
- include: '#variable'
646
+ ]
647
+ },
648
+ arguments: {
649
+ patterns: [
650
+ {
651
+ begin: '\\(',
652
+ beginCaptures: {
653
+ 0: {
654
+ name: 'punctuation.definition.arguments.begin.bracket.round.dolphindb'
655
+ }
588
656
  },
589
- {
590
- match: '(@(?:[a-zA-Z_$][\\w$]*)?)(\\.\\.\\.)?',
591
- captures: {
592
- 1: {
593
- name: 'variable.parameter.function.readwrite.instance.dolphindb'
594
- },
595
- 2: {
596
- name: 'keyword.operator.splat.dolphindb'
597
- }
657
+ end: '\\)',
658
+ endCaptures: {
659
+ 0: {
660
+ name: 'punctuation.definition.arguments.end.bracket.round.dolphindb'
598
661
  }
599
662
  },
600
- {
601
- include: '$self'
602
- }
603
- ]
604
- }
605
- ]
606
- },
607
- comment: {
608
- patterns: [
609
- {
610
- begin: '/\\*',
611
- beginCaptures: {
612
- 0: {
613
- name: 'punctuation.definition.comment.dolphindb'
614
- }
663
+ name: 'meta.arguments.dolphindb',
664
+ patterns: [
665
+ {
666
+ include: '$self'
667
+ },
668
+ {
669
+ include: '#literal'
670
+ },
671
+ {
672
+ include: '#variable'
673
+ }
674
+ ]
675
+ }
676
+ ]
677
+ },
678
+ variable: {
679
+ patterns: [
680
+ {
681
+ match: '(@)([a-zA-Z_\\$]\\w*)?',
682
+ name: 'variable.other.readwrite.instance.dolphindb'
683
+ }
684
+ ]
685
+ },
686
+ interpolated_dolphindb: {
687
+ patterns: [
688
+ {
689
+ begin: '\\#\\{',
690
+ captures: {
691
+ 0: {
692
+ name: 'punctuation.section.embedded.dolphindb'
693
+ }
694
+ },
695
+ end: '\\}',
696
+ name: 'source.dolphindb.embedded.source',
697
+ patterns: [
698
+ {
699
+ include: '$self'
700
+ }
701
+ ]
702
+ }
703
+ ]
704
+ },
705
+ method_call: {
706
+ patterns: [
707
+ {
708
+ begin: '(?:(\\.)|(::))\\s*([\\w$]+!?)(?=\\()',
709
+ beginCaptures: {
710
+ 1: {
711
+ name: 'punctuation.separator.method.period.dolphindb'
712
+ },
713
+ 2: {
714
+ name: 'keyword.operator.prototype.dolphindb'
715
+ },
716
+ 3: {
717
+ patterns: [
718
+ {
719
+ include: '#method_name'
720
+ }
721
+ ]
722
+ }
723
+ },
724
+ end: '(?<=\\))',
725
+ name: 'meta.method-call.dolphindb',
726
+ patterns: [
727
+ {
728
+ include: '#arguments'
729
+ }
730
+ ]
731
+ }
732
+ ]
733
+ },
734
+ method_name: {
735
+ patterns: [
736
+ {
737
+ match: '[a-zA-Z_$][\\w$]*',
738
+ name: 'entity.name.function.dolphindb'
615
739
  },
616
- end: '\\*/',
617
- endCaptures: {
618
- 0: {
619
- name: 'punctuation.definition.comment.dolphindb'
620
- }
740
+ {
741
+ match: '\\d[\\w$]*',
742
+ name: 'invalid.illegal.identifier.dolphindb'
743
+ }
744
+ ]
745
+ },
746
+ operator: {
747
+ patterns: [
748
+ {
749
+ match: '<<|>>',
750
+ name: 'keyword.operator.bitwise.shift.dolphindb'
621
751
  },
622
- name: 'comment.block.dolphindb'
623
- },
624
- {
625
- begin: '//',
626
- beginCaptures: {
627
- 0: {
628
- name: 'punctuation.definition.comment.dolphindb'
629
- }
752
+ {
753
+ match: '!=|<=|>=|==|>|<',
754
+ name: 'keyword.operator.comparison.dolphindb'
630
755
  },
631
- end: '$',
632
- name: 'comment.line.number-sign.dolphindb'
633
- },
634
- {
635
- begin: '#',
636
- beginCaptures: {
637
- 0: {
638
- name: 'punctuation.definition.comment.dolphindb'
639
- }
756
+ {
757
+ match: '<-|->',
758
+ name: 'keyword.operator.join.dolphindb'
640
759
  },
641
- end: '$',
642
- name: 'comment.line.number-sign.dolphindb'
643
- }
644
- ]
645
- },
646
- arguments: {
647
- patterns: [
648
- {
649
- begin: '\\(',
650
- beginCaptures: {
651
- 0: {
652
- name: 'punctuation.definition.arguments.begin.bracket.round.dolphindb'
653
- }
760
+ {
761
+ match: '&&|!|\\|\\|',
762
+ name: 'keyword.operator.logical.dolphindb'
654
763
  },
655
- end: '\\)',
656
- endCaptures: {
657
- 0: {
658
- name: 'punctuation.definition.arguments.end.bracket.round.dolphindb'
659
- }
764
+ {
765
+ match: '&|\\||\\^',
766
+ name: 'keyword.operator.bitwise.dolphindb'
660
767
  },
661
- name: 'meta.arguments.dolphindb',
662
- patterns: [
663
- {
664
- include: '$self'
665
- },
666
- {
667
- include: '#literal'
668
- },
669
- {
670
- include: '#variable'
671
- }
672
- ]
673
- }
674
- ]
675
- },
676
- variable: {
677
- patterns: [
678
- {
679
- match: '(@)([a-zA-Z_\\$]\\w*)?',
680
- name: 'variable.other.readwrite.instance.dolphindb'
681
- }
682
- ]
683
- },
684
- interpolated_dolphindb: {
685
- patterns: [
686
- {
687
- begin: '\\#\\{',
688
- captures: {
689
- 0: {
690
- name: 'punctuation.section.embedded.dolphindb'
691
- }
768
+ {
769
+ match: '\\.\\.',
770
+ name: 'keyword.operator.splat.dolphindb'
692
771
  },
693
- end: '\\}',
694
- name: 'source.dolphindb.embedded.source',
695
- patterns: [
696
- {
697
- include: '$self'
698
- }
699
- ]
700
- }
701
- ]
702
- },
703
- method_call: {
704
- patterns: [
705
- {
706
- begin: '(?:(\\.)|(::))\\s*([\\w$]+!?)(?=\\()',
707
- beginCaptures: {
708
- 1: {
709
- name: 'punctuation.separator.method.period.dolphindb'
710
- },
711
- 2: {
712
- name: 'keyword.operator.prototype.dolphindb'
713
- },
714
- 3: {
715
- patterns: [
716
- {
717
- include: '#method_name'
718
- }
719
- ]
720
- }
772
+ {
773
+ match: '\\?',
774
+ name: 'keyword.operator.existential.dolphindb'
721
775
  },
722
- end: '(?<=\\))',
723
- name: 'meta.method-call.dolphindb',
724
- patterns: [
725
- {
726
- include: '#arguments'
727
- }
728
- ]
729
- }
730
- ]
731
- },
732
- method_name: {
733
- patterns: [
734
- {
735
- match: '[a-zA-Z_$][\\w$]*',
736
- name: 'entity.name.function.dolphindb'
737
- },
738
- {
739
- match: '\\d[\\w$]*',
740
- name: 'invalid.illegal.identifier.dolphindb'
741
- }
742
- ]
743
- },
744
- operator: {
745
- patterns: [
746
- {
747
- match: '<<|>>',
748
- name: 'keyword.operator.bitwise.shift.dolphindb'
749
- },
750
- {
751
- match: '!=|<=|>=|==|>|<',
752
- name: 'keyword.operator.comparison.dolphindb'
753
- },
754
- {
755
- match: '<-|->',
756
- name: 'keyword.operator.join.dolphindb'
757
- },
758
- {
759
- match: '&&|!|\\|\\|',
760
- name: 'keyword.operator.logical.dolphindb'
761
- },
762
- {
763
- match: '&|\\||\\^',
764
- name: 'keyword.operator.bitwise.dolphindb'
765
- },
766
- {
767
- match: '\\.\\.',
768
- name: 'keyword.operator.splat.dolphindb'
769
- },
770
- {
771
- match: '\\?',
772
- name: 'keyword.operator.existential.dolphindb'
773
- },
774
- {
775
- match: '/|<-|%|\\*|/|-|\\$|\\+',
776
- name: 'keyword.operator.dolphindb'
777
- },
778
- {
779
- match: '([a-zA-Z$_][\\w$]*)?\\s*(=|:(?!:))(?![>=])',
780
- captures: {
781
- 1: {
782
- name: 'variable.assignment.dolphindb'
783
- },
784
- 2: {
785
- name: 'keyword.operator.assignment.dolphindb'
776
+ {
777
+ match: '/|<-|%|\\*|/|-|\\$|\\+',
778
+ name: 'keyword.operator.dolphindb'
779
+ },
780
+ {
781
+ match: '([a-zA-Z$_][\\w$]*)?\\s*(=|:(?!:))(?![>=])',
782
+ captures: {
783
+ 1: {
784
+ name: 'variable.assignment.dolphindb'
785
+ },
786
+ 2: {
787
+ name: 'keyword.operator.assignment.dolphindb'
788
+ }
786
789
  }
787
790
  }
788
- }
789
- ]
790
- },
791
- property: {
792
- patterns: [
793
- {
794
- match: '(?:(\\.)|(::))\\s*([A-Z][A-Z0-9_$]*\\b\\$*)(?=\\s*\\??(\\.\\s*[a-zA-Z_$]\\w*|::))',
795
- captures: {
796
- 1: {
797
- name: 'punctuation.separator.property.period.dolphindb'
798
- },
799
- 2: {
800
- name: 'keyword.operator.prototype.dolphindb'
801
- },
802
- 3: {
803
- name: 'constant.other.object.property.dolphindb'
791
+ ]
792
+ },
793
+ property: {
794
+ patterns: [
795
+ {
796
+ match: '(?:(\\.)|(::))\\s*([A-Z][A-Z0-9_$]*\\b\\$*)(?=\\s*\\??(\\.\\s*[a-zA-Z_$]\\w*|::))',
797
+ captures: {
798
+ 1: {
799
+ name: 'punctuation.separator.property.period.dolphindb'
800
+ },
801
+ 2: {
802
+ name: 'keyword.operator.prototype.dolphindb'
803
+ },
804
+ 3: {
805
+ name: 'constant.other.object.property.dolphindb'
806
+ }
804
807
  }
805
- }
806
- },
807
- {
808
- match: '(?:(\\.)|(::))\\s*(\\$*[a-zA-Z_$][\\w$]*)(?=\\s*\\??(\\.\\s*[a-zA-Z_$]\\w*|::))',
809
- captures: {
810
- 1: {
811
- name: 'punctuation.separator.property.period.dolphindb'
812
- },
813
- 2: {
814
- name: 'keyword.operator.prototype.dolphindb'
815
- },
816
- 3: {
817
- name: 'variable.other.object.property.dolphindb'
808
+ },
809
+ {
810
+ match: '(?:(\\.)|(::))\\s*(\\$*[a-zA-Z_$][\\w$]*)(?=\\s*\\??(\\.\\s*[a-zA-Z_$]\\w*|::))',
811
+ captures: {
812
+ 1: {
813
+ name: 'punctuation.separator.property.period.dolphindb'
814
+ },
815
+ 2: {
816
+ name: 'keyword.operator.prototype.dolphindb'
817
+ },
818
+ 3: {
819
+ name: 'variable.other.object.property.dolphindb'
820
+ }
818
821
  }
819
- }
820
- },
821
- {
822
- match: '(?:(\\.)|(::))\\s*([A-Z][A-Z0-9_$]*\\b\\$*)',
823
- captures: {
824
- 1: {
825
- name: 'punctuation.separator.property.period.dolphindb'
826
- },
827
- 2: {
828
- name: 'keyword.operator.prototype.dolphindb'
829
- },
830
- 3: {
831
- name: 'constant.other.property.dolphindb'
822
+ },
823
+ {
824
+ match: '(?:(\\.)|(::))\\s*([A-Z][A-Z0-9_$]*\\b\\$*)',
825
+ captures: {
826
+ 1: {
827
+ name: 'punctuation.separator.property.period.dolphindb'
828
+ },
829
+ 2: {
830
+ name: 'keyword.operator.prototype.dolphindb'
831
+ },
832
+ 3: {
833
+ name: 'constant.other.property.dolphindb'
834
+ }
832
835
  }
833
- }
834
- },
835
- {
836
- match: '(?:(\\.)|(::))\\s*(\\$*[a-zA-Z_$][\\w$]*)',
837
- captures: {
838
- 1: {
839
- name: 'punctuation.separator.property.period.dolphindb'
840
- },
841
- 2: {
842
- name: 'keyword.operator.prototype.dolphindb'
843
- },
844
- 3: {
845
- name: 'variable.other.property.dolphindb'
836
+ },
837
+ {
838
+ match: '(?:(\\.)|(::))\\s*(\\$*[a-zA-Z_$][\\w$]*)',
839
+ captures: {
840
+ 1: {
841
+ name: 'punctuation.separator.property.period.dolphindb'
842
+ },
843
+ 2: {
844
+ name: 'keyword.operator.prototype.dolphindb'
845
+ },
846
+ 3: {
847
+ name: 'variable.other.property.dolphindb'
848
+ }
846
849
  }
847
- }
848
- },
849
- {
850
- match: '(?:(\\.)|(::))\\s*([0-9][\\w$]*)',
851
- captures: {
852
- 1: {
853
- name: 'punctuation.separator.property.period.dolphindb'
854
- },
855
- 2: {
856
- name: 'keyword.operator.prototype.dolphindb'
857
- },
858
- 3: {
859
- name: 'invalid.illegal.identifier.dolphindb'
850
+ },
851
+ {
852
+ match: '(?:(\\.)|(::))\\s*([0-9][\\w$]*)',
853
+ captures: {
854
+ 1: {
855
+ name: 'punctuation.separator.property.period.dolphindb'
856
+ },
857
+ 2: {
858
+ name: 'keyword.operator.prototype.dolphindb'
859
+ },
860
+ 3: {
861
+ name: 'invalid.illegal.identifier.dolphindb'
862
+ }
860
863
  }
861
864
  }
862
- }
863
- ]
865
+ ]
866
+ }
864
867
  }
865
- }
866
- };
868
+ };
869
+ }
870
+ export const tm_language = get_tm_language(false);
871
+ export const tm_language_python = get_tm_language(true);
867
872
  //# sourceMappingURL=language.js.map