diff --git a/src/pla/pla.test.ts b/src/pla/pla.test.ts index 20ed0d47..553d8675 100644 --- a/src/pla/pla.test.ts +++ b/src/pla/pla.test.ts @@ -214,11 +214,11 @@ testTokenization('pla', [ ] }, { - line: '.type inval', + line: '.type other', tokens: [ { startIndex: 0, type: 'keyword.type.pla' }, { startIndex: 5, type: '' }, - { startIndex: 6, type: 'invalid.pla' } + { startIndex: 6, type: 'type.pla' } ] } ], diff --git a/src/pla/pla.ts b/src/pla/pla.ts index 59a732d4..0f45d80e 100644 --- a/src/pla/pla.ts +++ b/src/pla/pla.ts @@ -54,8 +54,6 @@ export const language = { '.end' ], - types: ['f', 'r', 'fd', 'fr', 'dr', 'fdr'], - // regular expressions comment: /#.*$/, identifier: /[a-zA-Z]+[a-zA-Z0-9_\-]*/, @@ -94,18 +92,7 @@ export const language = { whitespace: [[/[ \t\r\n]+/, '']], - type: [ - { include: '@whitespace' }, - [ - /\w+/, - { - cases: { - '@types': { token: 'type', next: '@pop' }, - '@default': { token: 'invalid', next: '@pop' } - } - } - ] - ], + type: [{ include: '@whitespace' }, [/\w+/, { token: 'type', next: '@pop' }]], keywordArg: [ // whitespace