abap.js 18 KB

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