abap.js 23 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120
  1. /*---------------------------------------------------------------------------------------------
  2. * Copyright (c) Microsoft Corporation. All rights reserved.
  3. * Licensed under the MIT License. See License.txt in the project root for license information.
  4. *--------------------------------------------------------------------------------------------*/
  5. define('vs/basic-languages/abap/abap',["require", "exports"], function (require, exports) {
  6. "use strict";
  7. Object.defineProperty(exports, "__esModule", { value: true });
  8. exports.language = exports.conf = void 0;
  9. exports.conf = {
  10. comments: {
  11. lineComment: '*'
  12. },
  13. brackets: [
  14. ['[', ']'],
  15. ['(', ')']
  16. ]
  17. };
  18. var abapKeywords = [
  19. // words
  20. 'abap-source',
  21. 'abbreviated',
  22. 'abstract',
  23. 'accept',
  24. 'accepting',
  25. 'according',
  26. 'activation',
  27. 'actual',
  28. 'add',
  29. 'add-corresponding',
  30. 'adjacent',
  31. 'after',
  32. 'alias',
  33. 'aliases',
  34. 'align',
  35. 'all',
  36. 'allocate',
  37. 'alpha',
  38. 'analysis',
  39. 'analyzer',
  40. 'append',
  41. 'appendage',
  42. 'appending',
  43. 'application',
  44. 'archive',
  45. 'area',
  46. 'arithmetic',
  47. 'as',
  48. 'ascending',
  49. 'aspect',
  50. 'assert',
  51. 'assign',
  52. 'assigned',
  53. 'assigning',
  54. 'association',
  55. 'asynchronous',
  56. 'at',
  57. 'attributes',
  58. 'authority',
  59. 'authority-check',
  60. 'avg',
  61. 'back',
  62. 'background',
  63. 'backup',
  64. 'backward',
  65. 'badi',
  66. 'base',
  67. 'before',
  68. 'begin',
  69. 'big',
  70. 'binary',
  71. 'bintohex',
  72. 'bit',
  73. 'black',
  74. 'blank',
  75. 'blanks',
  76. 'blob',
  77. 'block',
  78. 'blocks',
  79. 'blue',
  80. 'bound',
  81. 'boundaries',
  82. 'bounds',
  83. 'boxed',
  84. 'break-point',
  85. 'buffer',
  86. 'by',
  87. 'bypassing',
  88. 'byte',
  89. 'byte-order',
  90. 'call',
  91. 'calling',
  92. 'case',
  93. 'cast',
  94. 'casting',
  95. 'catch',
  96. 'center',
  97. 'centered',
  98. 'chain',
  99. 'chain-input',
  100. 'chain-request',
  101. 'change',
  102. 'changing',
  103. 'channels',
  104. 'character',
  105. 'char-to-hex',
  106. 'check',
  107. 'checkbox',
  108. 'ci_',
  109. 'circular',
  110. 'class',
  111. 'class-coding',
  112. 'class-data',
  113. 'class-events',
  114. 'class-methods',
  115. 'class-pool',
  116. 'cleanup',
  117. 'clear',
  118. 'client',
  119. 'clob',
  120. 'clock',
  121. 'close',
  122. 'coalesce',
  123. 'code',
  124. 'coding',
  125. 'col_background',
  126. 'col_group',
  127. 'col_heading',
  128. 'col_key',
  129. 'col_negative',
  130. 'col_normal',
  131. 'col_positive',
  132. 'col_total',
  133. 'collect',
  134. 'color',
  135. 'column',
  136. 'columns',
  137. 'comment',
  138. 'comments',
  139. 'commit',
  140. 'common',
  141. 'communication',
  142. 'comparing',
  143. 'component',
  144. 'components',
  145. 'compression',
  146. 'compute',
  147. 'concat',
  148. 'concat_with_space',
  149. 'concatenate',
  150. 'cond',
  151. 'condition',
  152. 'connect',
  153. 'connection',
  154. 'constants',
  155. 'context',
  156. 'contexts',
  157. 'continue',
  158. 'control',
  159. 'controls',
  160. 'conv',
  161. 'conversion',
  162. 'convert',
  163. 'copies',
  164. 'copy',
  165. 'corresponding',
  166. 'country',
  167. 'cover',
  168. 'cpi',
  169. 'create',
  170. 'creating',
  171. 'critical',
  172. 'currency',
  173. 'currency_conversion',
  174. 'current',
  175. 'cursor',
  176. 'cursor-selection',
  177. 'customer',
  178. 'customer-function',
  179. 'dangerous',
  180. 'data',
  181. 'database',
  182. 'datainfo',
  183. 'dataset',
  184. 'date',
  185. 'dats_add_days',
  186. 'dats_add_months',
  187. 'dats_days_between',
  188. 'dats_is_valid',
  189. 'daylight',
  190. 'dd/mm/yy',
  191. 'dd/mm/yyyy',
  192. 'ddmmyy',
  193. 'deallocate',
  194. 'decimal_shift',
  195. 'decimals',
  196. 'declarations',
  197. 'deep',
  198. 'default',
  199. 'deferred',
  200. 'define',
  201. 'defining',
  202. 'definition',
  203. 'delete',
  204. 'deleting',
  205. 'demand',
  206. 'department',
  207. 'descending',
  208. 'describe',
  209. 'destination',
  210. 'detail',
  211. 'dialog',
  212. 'directory',
  213. 'disconnect',
  214. 'display',
  215. 'display-mode',
  216. 'distinct',
  217. 'divide',
  218. 'divide-corresponding',
  219. 'division',
  220. 'do',
  221. 'dummy',
  222. 'duplicate',
  223. 'duplicates',
  224. 'duration',
  225. 'during',
  226. 'dynamic',
  227. 'dynpro',
  228. 'edit',
  229. 'editor-call',
  230. 'else',
  231. 'elseif',
  232. 'empty',
  233. 'enabled',
  234. 'enabling',
  235. 'encoding',
  236. 'end',
  237. 'endat',
  238. 'endcase',
  239. 'endcatch',
  240. 'endchain',
  241. 'endclass',
  242. 'enddo',
  243. 'endenhancement',
  244. 'end-enhancement-section',
  245. 'endexec',
  246. 'endform',
  247. 'endfunction',
  248. 'endian',
  249. 'endif',
  250. 'ending',
  251. 'endinterface',
  252. 'end-lines',
  253. 'endloop',
  254. 'endmethod',
  255. 'endmodule',
  256. 'end-of-definition',
  257. 'end-of-editing',
  258. 'end-of-file',
  259. 'end-of-page',
  260. 'end-of-selection',
  261. 'endon',
  262. 'endprovide',
  263. 'endselect',
  264. 'end-test-injection',
  265. 'end-test-seam',
  266. 'endtry',
  267. 'endwhile',
  268. 'endwith',
  269. 'engineering',
  270. 'enhancement',
  271. 'enhancement-point',
  272. 'enhancements',
  273. 'enhancement-section',
  274. 'entries',
  275. 'entry',
  276. 'enum',
  277. 'environment',
  278. 'errormessage',
  279. 'errors',
  280. 'escaping',
  281. 'event',
  282. 'events',
  283. 'exact',
  284. 'except',
  285. 'exception',
  286. 'exceptions',
  287. 'exception-table',
  288. 'exclude',
  289. 'excluding',
  290. 'exec',
  291. 'execute',
  292. 'exists',
  293. 'exit',
  294. 'exit-command',
  295. 'expand',
  296. 'expanding',
  297. 'expiration',
  298. 'explicit',
  299. 'exponent',
  300. 'export',
  301. 'exporting',
  302. 'extend',
  303. 'extended',
  304. 'extension',
  305. 'extract',
  306. 'fail',
  307. 'fetch',
  308. 'field',
  309. 'field-groups',
  310. 'fields',
  311. 'field-symbol',
  312. 'field-symbols',
  313. 'file',
  314. 'filter',
  315. 'filters',
  316. 'filter-table',
  317. 'final',
  318. 'first',
  319. 'first-line',
  320. 'fixed-point',
  321. 'fkeq',
  322. 'fkge',
  323. 'flush',
  324. 'font',
  325. 'for',
  326. 'form',
  327. 'format',
  328. 'forward',
  329. 'found',
  330. 'frame',
  331. 'frames',
  332. 'free',
  333. 'friends',
  334. 'from',
  335. 'function',
  336. 'functionality',
  337. 'function-pool',
  338. 'further',
  339. 'gaps',
  340. 'generate',
  341. 'get',
  342. 'giving',
  343. 'gkeq',
  344. 'gkge',
  345. 'global',
  346. 'grant',
  347. 'green',
  348. 'group',
  349. 'groups',
  350. 'handle',
  351. 'handler',
  352. 'harmless',
  353. 'hashed',
  354. 'having',
  355. 'hdb',
  356. 'header',
  357. 'headers',
  358. 'heading',
  359. 'head-lines',
  360. 'help-id',
  361. 'help-request',
  362. 'hextobin',
  363. 'hide',
  364. 'high',
  365. 'hint',
  366. 'hold',
  367. 'hotspot',
  368. 'icon',
  369. 'id',
  370. 'identification',
  371. 'identifier',
  372. 'ids',
  373. 'if',
  374. 'ignore',
  375. 'ignoring',
  376. 'immediately',
  377. 'implementation',
  378. 'implementations',
  379. 'implemented',
  380. 'implicit',
  381. 'import',
  382. 'importing',
  383. 'inactive',
  384. 'incl',
  385. 'include',
  386. 'includes',
  387. 'including',
  388. 'increment',
  389. 'index',
  390. 'index-line',
  391. 'infotypes',
  392. 'inheriting',
  393. 'init',
  394. 'initial',
  395. 'initialization',
  396. 'inner',
  397. 'inout',
  398. 'input',
  399. 'instance',
  400. 'instances',
  401. 'instr',
  402. 'intensified',
  403. 'interface',
  404. 'interface-pool',
  405. 'interfaces',
  406. 'internal',
  407. 'intervals',
  408. 'into',
  409. 'inverse',
  410. 'inverted-date',
  411. 'is',
  412. 'iso',
  413. 'job',
  414. 'join',
  415. 'keep',
  416. 'keeping',
  417. 'kernel',
  418. 'key',
  419. 'keys',
  420. 'keywords',
  421. 'kind',
  422. 'language',
  423. 'last',
  424. 'late',
  425. 'layout',
  426. 'leading',
  427. 'leave',
  428. 'left',
  429. 'left-justified',
  430. 'leftplus',
  431. 'leftspace',
  432. 'legacy',
  433. 'length',
  434. 'let',
  435. 'level',
  436. 'levels',
  437. 'like',
  438. 'line',
  439. 'line-count',
  440. 'linefeed',
  441. 'line-selection',
  442. 'line-size',
  443. 'list',
  444. 'listbox',
  445. 'list-processing',
  446. 'little',
  447. 'llang',
  448. 'load',
  449. 'load-of-program',
  450. 'lob',
  451. 'local',
  452. 'locale',
  453. 'locator',
  454. 'logfile',
  455. 'logical',
  456. 'log-point',
  457. 'long',
  458. 'loop',
  459. 'low',
  460. 'lower',
  461. 'lpad',
  462. 'lpi',
  463. 'ltrim',
  464. 'mail',
  465. 'main',
  466. 'major-id',
  467. 'mapping',
  468. 'margin',
  469. 'mark',
  470. 'mask',
  471. 'matchcode',
  472. 'max',
  473. 'maximum',
  474. 'medium',
  475. 'members',
  476. 'memory',
  477. 'mesh',
  478. 'message',
  479. 'message-id',
  480. 'messages',
  481. 'messaging',
  482. 'method',
  483. 'methods',
  484. 'min',
  485. 'minimum',
  486. 'minor-id',
  487. 'mm/dd/yy',
  488. 'mm/dd/yyyy',
  489. 'mmddyy',
  490. 'mode',
  491. 'modif',
  492. 'modifier',
  493. 'modify',
  494. 'module',
  495. 'move',
  496. 'move-corresponding',
  497. 'multiply',
  498. 'multiply-corresponding',
  499. 'name',
  500. 'nametab',
  501. 'native',
  502. 'nested',
  503. 'nesting',
  504. 'new',
  505. 'new-line',
  506. 'new-page',
  507. 'new-section',
  508. 'next',
  509. 'no',
  510. 'node',
  511. 'nodes',
  512. 'no-display',
  513. 'no-extension',
  514. 'no-gap',
  515. 'no-gaps',
  516. 'no-grouping',
  517. 'no-heading',
  518. 'non-unicode',
  519. 'non-unique',
  520. 'no-scrolling',
  521. 'no-sign',
  522. 'no-title',
  523. 'no-topofpage',
  524. 'no-zero',
  525. 'null',
  526. 'number',
  527. 'object',
  528. 'objects',
  529. 'obligatory',
  530. 'occurrence',
  531. 'occurrences',
  532. 'occurs',
  533. 'of',
  534. 'off',
  535. 'offset',
  536. 'ole',
  537. 'on',
  538. 'only',
  539. 'open',
  540. 'option',
  541. 'optional',
  542. 'options',
  543. 'order',
  544. 'other',
  545. 'others',
  546. 'out',
  547. 'outer',
  548. 'output',
  549. 'output-length',
  550. 'overflow',
  551. 'overlay',
  552. 'pack',
  553. 'package',
  554. 'pad',
  555. 'padding',
  556. 'page',
  557. 'pages',
  558. 'parameter',
  559. 'parameters',
  560. 'parameter-table',
  561. 'part',
  562. 'partially',
  563. 'pattern',
  564. 'percentage',
  565. 'perform',
  566. 'performing',
  567. 'person',
  568. 'pf1',
  569. 'pf10',
  570. 'pf11',
  571. 'pf12',
  572. 'pf13',
  573. 'pf14',
  574. 'pf15',
  575. 'pf2',
  576. 'pf3',
  577. 'pf4',
  578. 'pf5',
  579. 'pf6',
  580. 'pf7',
  581. 'pf8',
  582. 'pf9',
  583. 'pf-status',
  584. 'pink',
  585. 'places',
  586. 'pool',
  587. 'pos_high',
  588. 'pos_low',
  589. 'position',
  590. 'pragmas',
  591. 'precompiled',
  592. 'preferred',
  593. 'preserving',
  594. 'primary',
  595. 'print',
  596. 'print-control',
  597. 'priority',
  598. 'private',
  599. 'procedure',
  600. 'process',
  601. 'program',
  602. 'property',
  603. 'protected',
  604. 'provide',
  605. 'public',
  606. 'push',
  607. 'pushbutton',
  608. 'put',
  609. 'queue-only',
  610. 'quickinfo',
  611. 'radiobutton',
  612. 'raise',
  613. 'raising',
  614. 'range',
  615. 'ranges',
  616. 'read',
  617. 'reader',
  618. 'read-only',
  619. 'receive',
  620. 'received',
  621. 'receiver',
  622. 'receiving',
  623. 'red',
  624. 'redefinition',
  625. 'reduce',
  626. 'reduced',
  627. 'ref',
  628. 'reference',
  629. 'refresh',
  630. 'regex',
  631. 'reject',
  632. 'remote',
  633. 'renaming',
  634. 'replacement',
  635. 'replacing',
  636. 'report',
  637. 'request',
  638. 'requested',
  639. 'reserve',
  640. 'reset',
  641. 'resolution',
  642. 'respecting',
  643. 'responsible',
  644. 'result',
  645. 'results',
  646. 'resumable',
  647. 'resume',
  648. 'retry',
  649. 'return',
  650. 'returncode',
  651. 'returning',
  652. 'returns',
  653. 'right',
  654. 'right-justified',
  655. 'rightplus',
  656. 'rightspace',
  657. 'risk',
  658. 'rmc_communication_failure',
  659. 'rmc_invalid_status',
  660. 'rmc_system_failure',
  661. 'role',
  662. 'rollback',
  663. 'rows',
  664. 'rpad',
  665. 'rtrim',
  666. 'run',
  667. 'sap',
  668. 'sap-spool',
  669. 'saving',
  670. 'scale_preserving',
  671. 'scale_preserving_scientific',
  672. 'scan',
  673. 'scientific',
  674. 'scientific_with_leading_zero',
  675. 'scroll',
  676. 'scroll-boundary',
  677. 'scrolling',
  678. 'search',
  679. 'secondary',
  680. 'seconds',
  681. 'section',
  682. 'select',
  683. 'selection',
  684. 'selections',
  685. 'selection-screen',
  686. 'selection-set',
  687. 'selection-sets',
  688. 'selection-table',
  689. 'select-options',
  690. 'send',
  691. 'separate',
  692. 'separated',
  693. 'set',
  694. 'shared',
  695. 'shift',
  696. 'short',
  697. 'shortdump-id',
  698. 'sign_as_postfix',
  699. 'single',
  700. 'size',
  701. 'skip',
  702. 'skipping',
  703. 'smart',
  704. 'some',
  705. 'sort',
  706. 'sortable',
  707. 'sorted',
  708. 'source',
  709. 'specified',
  710. 'split',
  711. 'spool',
  712. 'spots',
  713. 'sql',
  714. 'sqlscript',
  715. 'stable',
  716. 'stamp',
  717. 'standard',
  718. 'starting',
  719. 'start-of-editing',
  720. 'start-of-selection',
  721. 'state',
  722. 'statement',
  723. 'statements',
  724. 'static',
  725. 'statics',
  726. 'statusinfo',
  727. 'step-loop',
  728. 'stop',
  729. 'structure',
  730. 'structures',
  731. 'style',
  732. 'subkey',
  733. 'submatches',
  734. 'submit',
  735. 'subroutine',
  736. 'subscreen',
  737. 'subtract',
  738. 'subtract-corresponding',
  739. 'suffix',
  740. 'sum',
  741. 'summary',
  742. 'summing',
  743. 'supplied',
  744. 'supply',
  745. 'suppress',
  746. 'switch',
  747. 'switchstates',
  748. 'symbol',
  749. 'syncpoints',
  750. 'syntax',
  751. 'syntax-check',
  752. 'syntax-trace',
  753. 'system-call',
  754. 'system-exceptions',
  755. 'system-exit',
  756. 'tab',
  757. 'tabbed',
  758. 'tables',
  759. 'tableview',
  760. 'tabstrip',
  761. 'target',
  762. 'task',
  763. 'tasks',
  764. 'test',
  765. 'testing',
  766. 'test-injection',
  767. 'test-seam',
  768. 'text',
  769. 'textpool',
  770. 'then',
  771. 'throw',
  772. 'time',
  773. 'times',
  774. 'timestamp',
  775. 'timezone',
  776. 'tims_is_valid',
  777. 'title',
  778. 'titlebar',
  779. 'title-lines',
  780. 'to',
  781. 'tokenization',
  782. 'tokens',
  783. 'top-lines',
  784. 'top-of-page',
  785. 'trace-file',
  786. 'trace-table',
  787. 'trailing',
  788. 'transaction',
  789. 'transfer',
  790. 'transformation',
  791. 'transporting',
  792. 'trmac',
  793. 'truncate',
  794. 'truncation',
  795. 'try',
  796. 'tstmp_add_seconds',
  797. 'tstmp_current_utctimestamp',
  798. 'tstmp_is_valid',
  799. 'tstmp_seconds_between',
  800. 'type',
  801. 'type-pool',
  802. 'type-pools',
  803. 'types',
  804. 'uline',
  805. 'unassign',
  806. 'under',
  807. 'unicode',
  808. 'union',
  809. 'unique',
  810. 'unit_conversion',
  811. 'unix',
  812. 'unpack',
  813. 'until',
  814. 'unwind',
  815. 'up',
  816. 'update',
  817. 'upper',
  818. 'user',
  819. 'user-command',
  820. 'using',
  821. 'utf-8',
  822. 'valid',
  823. 'value',
  824. 'value-request',
  825. 'values',
  826. 'vary',
  827. 'varying',
  828. 'verification-message',
  829. 'version',
  830. 'via',
  831. 'view',
  832. 'visible',
  833. 'wait',
  834. 'warning',
  835. 'when',
  836. 'whenever',
  837. 'where',
  838. 'while',
  839. 'width',
  840. 'window',
  841. 'windows',
  842. 'with',
  843. 'with-heading',
  844. 'without',
  845. 'with-title',
  846. 'word',
  847. 'work',
  848. 'write',
  849. 'writer',
  850. 'xml',
  851. 'xsd',
  852. 'yellow',
  853. 'yes',
  854. 'yymmdd',
  855. 'zero',
  856. 'zone',
  857. // built-ins
  858. 'abs',
  859. 'acos',
  860. 'asin',
  861. 'atan',
  862. 'bit-set',
  863. 'boolc',
  864. 'boolx',
  865. 'ceil',
  866. 'char_off',
  867. 'charlen',
  868. 'cmax',
  869. 'cmin',
  870. 'concat_lines_of',
  871. 'condense',
  872. 'contains',
  873. 'contains_any_not_of',
  874. 'contains_any_of',
  875. 'cos',
  876. 'cosh',
  877. 'count',
  878. 'count_any_not_of',
  879. 'count_any_of',
  880. 'dbmaxlen',
  881. 'distance',
  882. 'escape',
  883. 'exp',
  884. 'find',
  885. 'find_any_not_of',
  886. 'find_any_of',
  887. 'find_end',
  888. 'floor',
  889. 'frac',
  890. 'from_mixed',
  891. 'insert',
  892. 'ipow',
  893. 'line_exists',
  894. 'line_index',
  895. 'lines',
  896. 'log',
  897. 'log10',
  898. 'match',
  899. 'matches',
  900. 'nmax',
  901. 'nmin',
  902. 'numofchar',
  903. 'repeat',
  904. 'replace',
  905. 'rescale',
  906. 'reverse',
  907. 'round',
  908. 'segment',
  909. 'shift_left',
  910. 'shift_right',
  911. 'sign',
  912. 'sin',
  913. 'sinh',
  914. 'sqrt',
  915. 'strlen',
  916. 'substring',
  917. 'substring_after',
  918. 'substring_before',
  919. 'substring_from',
  920. 'substring_to',
  921. 'tan',
  922. 'tanh',
  923. 'to_lower',
  924. 'to_mixed',
  925. 'to_upper',
  926. 'translate',
  927. 'trunc',
  928. 'utclong_add',
  929. 'utclong_current',
  930. 'utclong_diff',
  931. 'xsdbool',
  932. 'xstrlen'
  933. ];
  934. exports.language = {
  935. defaultToken: 'invalid',
  936. ignoreCase: true,
  937. tokenPostfix: '.abap',
  938. keywords: abapKeywords,
  939. typeKeywords: [
  940. // built-in data types
  941. 'b',
  942. 'c',
  943. 'd',
  944. 'decfloat16',
  945. 'decfloat34',
  946. 'f',
  947. 'i',
  948. 'int8',
  949. 'n',
  950. 'p',
  951. 's',
  952. 'string',
  953. 't',
  954. 'utclong',
  955. 'x',
  956. 'xstring',
  957. // generic data types
  958. 'any',
  959. 'clike',
  960. 'csequence',
  961. 'decfloat',
  962. 'numeric',
  963. 'simple',
  964. 'xsequence',
  965. // generic table types
  966. 'table',
  967. // 'any table',
  968. 'hashed',
  969. 'index',
  970. 'sorted',
  971. 'standard',
  972. // ddic data types
  973. 'accp',
  974. 'char',
  975. 'clnt',
  976. 'cuky',
  977. 'curr',
  978. 'dats',
  979. 'dec',
  980. 'df16_dec',
  981. 'df16_raw',
  982. 'df34_dec',
  983. 'df34_raw',
  984. 'fltp',
  985. 'int1',
  986. 'int2',
  987. 'int4',
  988. // 'int8', built-in since 7.54
  989. 'lang',
  990. 'lchr',
  991. 'lraw',
  992. 'numc',
  993. 'quan',
  994. 'raw',
  995. 'rawstring',
  996. 'sstring',
  997. 'tims',
  998. 'unit',
  999. // ddic data types (obsolete)
  1000. 'df16_scl',
  1001. 'df34_scl',
  1002. 'prec',
  1003. 'varc',
  1004. // special data types
  1005. 'abap_bool',
  1006. 'space',
  1007. 'me',
  1008. 'syst',
  1009. 'sy',
  1010. 'screen'
  1011. ],
  1012. operators: [
  1013. // arithmetic operators
  1014. ' +',
  1015. ' -',
  1016. '/',
  1017. '*',
  1018. '**',
  1019. 'div',
  1020. 'mod',
  1021. // assignment operators
  1022. '=',
  1023. '#',
  1024. '@',
  1025. // concat operators
  1026. '&',
  1027. '&&',
  1028. // bit operators
  1029. 'bit-and',
  1030. 'bit-not',
  1031. 'bit-or',
  1032. 'bit-xor',
  1033. 'm',
  1034. 'o',
  1035. 'z',
  1036. // boolean operators
  1037. 'and',
  1038. 'equiv',
  1039. 'not',
  1040. 'or',
  1041. // comparison operators
  1042. ' < ',
  1043. ' > ',
  1044. '<=',
  1045. '>=',
  1046. '<>',
  1047. '><',
  1048. '=<',
  1049. '=>',
  1050. 'between',
  1051. 'bt',
  1052. 'byte-ca',
  1053. 'byte-cn',
  1054. 'byte-co',
  1055. 'byte-cs',
  1056. 'byte-na',
  1057. 'byte-ns',
  1058. 'ca',
  1059. 'cn',
  1060. 'co',
  1061. 'cp',
  1062. 'cs',
  1063. 'eq',
  1064. 'ge',
  1065. 'gt',
  1066. 'in',
  1067. 'le',
  1068. 'lt',
  1069. 'na',
  1070. 'nb',
  1071. 'ne',
  1072. 'np',
  1073. 'ns'
  1074. ],
  1075. symbols: /[=><!~?&+\-*\/\^%#@]+/,
  1076. tokenizer: {
  1077. root: [
  1078. [
  1079. /[a-z_$][\w-$]*/,
  1080. {
  1081. cases: {
  1082. '@typeKeywords': 'keyword',
  1083. '@keywords': 'keyword',
  1084. '@operators': 'operator',
  1085. '@default': 'identifier'
  1086. }
  1087. }
  1088. ],
  1089. [/<[\w]+>/, 'identifier'],
  1090. { include: '@whitespace' },
  1091. [/[:,.]/, 'delimiter'],
  1092. [/[{}()\[\]]/, '@brackets'],
  1093. [/@symbols/, { cases: { '@operators': 'operator', '@default': '' } }],
  1094. [/'/, { token: 'string', bracket: '@open', next: '@stringquote' }],
  1095. [/`/, { token: 'string', bracket: '@open', next: '@stringping' }],
  1096. [/\|/, { token: 'string', bracket: '@open', next: '@stringtemplate' }],
  1097. [/\d+/, 'number']
  1098. ],
  1099. stringtemplate: [
  1100. [/[^\\\|]+/, 'string'],
  1101. [/\\\|/, 'string'],
  1102. [/\|/, { token: 'string', bracket: '@close', next: '@pop' }]
  1103. ],
  1104. stringping: [
  1105. [/[^\\`]+/, 'string'],
  1106. [/`/, { token: 'string', bracket: '@close', next: '@pop' }]
  1107. ],
  1108. stringquote: [
  1109. [/[^\\']+/, 'string'],
  1110. [/'/, { token: 'string', bracket: '@close', next: '@pop' }]
  1111. ],
  1112. whitespace: [
  1113. [/[ \t\r\n]+/, ''],
  1114. [/^\*.*$/, 'comment'],
  1115. [/\".*$/, 'comment']
  1116. ]
  1117. }
  1118. };
  1119. });