Browse Source

Fixing ATS/Postiats hilighting.

Artyom Shalkhakov 9 years ago
parent
commit
ba5e90065a
2 changed files with 7 additions and 1 deletions
  1. 1 1
      src/postiats.ts
  2. 6 0
      test/postiats.test.ts

+ 1 - 1
src/postiats.ts

@@ -610,7 +610,7 @@ export var language = <ILanguage> {
       [/\(\*/, 'comment', '@push' ],
       [/\(\*/, 'comment.invalid' ],
       [/\*\)/, 'comment', '@pop' ],
-      [/.*/, 'invalid']
+      [/\*/, 'comment']
     ],
     lexing_COMMENT_block_c: [
       [/[^\/*]+/, 'comment' ],

+ 6 - 0
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: [