Fix operators and testcase

This commit is contained in:
Marc Bernard 2020-09-22 16:40:28 -04:00
parent 575f6764c9
commit feeaa714aa
2 changed files with 18 additions and 2 deletions

View file

@ -121,7 +121,7 @@ testTokenization('abap', [
{ startIndex: 6, type: '' },
{ startIndex: 7, type: 'keyword.abap' },
{ startIndex: 9, type: '' },
{ startIndex: 10, type: 'keyword.abap' },
{ startIndex: 10, type: 'operator.abap' },
{ startIndex: 13, type: '' },
{ startIndex: 14, type: 'keyword.abap' },
{ startIndex: 21, type: 'delimiter.abap' }

View file

@ -571,7 +571,21 @@ const abapKeywords = [
'perform',
'performing',
'person',
'pf',
'pf1',
'pf10',
'pf11',
'pf12',
'pf13',
'pf14',
'pf15',
'pf2',
'pf3',
'pf4',
'pf5',
'pf6',
'pf7',
'pf8',
'pf9',
'pf-status',
'pink',
'places',
@ -1078,6 +1092,7 @@ export const language = <languages.IMonarchLanguage>{
cases: {
'@typeKeywords': 'keyword',
'@keywords': 'keyword',
'@operators': 'operator',
'@default': 'identifier'
}
}
@ -1090,6 +1105,7 @@ export const language = <languages.IMonarchLanguage>{
[/[:,.]/, 'delimiter'],
[/[{}()\[\]]/, '@brackets'],
[/@symbols/, { cases: { '@operators': 'operator', '@default': '' } }],
[/'/, { token: 'string', bracket: '@open', next: '@stringquote' }],