From ba5e90065abfc6084b8b00d0fae3b8bd48fafffe Mon Sep 17 00:00:00 2001 From: Artyom Shalkhakov Date: Thu, 7 Jul 2016 22:25:49 +0600 Subject: [PATCH] Fixing ATS/Postiats hilighting. --- src/postiats.ts | 2 +- test/postiats.test.ts | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) 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: [