diff --git a/src/postiats.ts b/src/postiats.ts index 5dc09a7a..53cdaf99 100644 --- a/src/postiats.ts +++ b/src/postiats.ts @@ -610,7 +610,7 @@ export var language = { [/\(\*/, 'comment', '@push' ], [/\(\*/, 'comment.invalid' ], [/\*\)/, 'comment', '@pop' ], - [/.*/, 'invalid'] + [/\*/, 'comment'] ], lexing_COMMENT_block_c: [ [/[^\/*]+/, 'comment' ], diff --git a/test/postiats.test.ts b/test/postiats.test.ts index fd7b0657..32e14652 100644 --- a/test/postiats.test.ts +++ b/test/postiats.test.ts @@ -177,6 +177,12 @@ testTokenization('postiats', [ { startIndex: 0, type: 'comment.pats' } ]}], + [{ + line: '(* ****** ****** *)', + tokens: [ + { startIndex: 0, type: 'comment.pats' } + ]}], + [{ line: 'var x : int = (* a simple comment *) 1;', tokens: [