Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Improve comment matching, supporting asterisk comments.

Due to the way the grammar is structured I have removed the deprecated comment matching for the modern grammar.
  • Loading branch information...
commit a93323673c7e18b2806483c6d8f4e1b7b1a0a5c0 1 parent 0525d27
Michael Sheets authored October 22, 2011
23  Syntaxes/Fortran - Modern.tmLanguage
@@ -47,29 +47,6 @@
47 47
 	<key>patterns</key>
48 48
 	<array>
49 49
 		<dict>
50  
-			<key>begin</key>
51  
-			<string>^[Cc]\s+</string>
52  
-			<key>beginCaptures</key>
53  
-			<dict>
54  
-				<key>0</key>
55  
-				<dict>
56  
-					<key>name</key>
57  
-					<string>punctuation.definition.comment.fortran</string>
58  
-				</dict>
59  
-			</dict>
60  
-			<key>end</key>
61  
-			<string>$\n?</string>
62  
-			<key>name</key>
63  
-			<string>invalid.deprecated.comment.line.fortran</string>
64  
-			<key>patterns</key>
65  
-			<array>
66  
-				<dict>
67  
-					<key>match</key>
68  
-					<string>\\\s*\n</string>
69  
-				</dict>
70  
-			</array>
71  
-		</dict>
72  
-		<dict>
73 50
 			<key>include</key>
74 51
 			<string>source.fortran</string>
75 52
 		</dict>
27  Syntaxes/Fortran - Punchcard.tmLanguage
@@ -216,7 +216,7 @@
216 216
 			<key>comment</key>
217 217
 			<string>operators</string>
218 218
 			<key>match</key>
219  
-			<string>((?&lt;!\=)\=(?!\=)|\-|\+|\/\/|\/|\*|::)</string>
  219
+			<string>((?&lt;!\=)\=(?!\=)|\-|\+|\/\/|\/|(?!^)\*|::)</string>
220 220
 			<key>name</key>
221 221
 			<string>keyword.operator.fortran</string>
222 222
 		</dict>
@@ -400,7 +400,7 @@
400 400
 		</dict>
401 401
 		<dict>
402 402
 			<key>begin</key>
403  
-			<string>^[Cc]</string>
  403
+			<string>^[Cc](?=\b|[Cc])</string>
404 404
 			<key>beginCaptures</key>
405 405
 			<dict>
406 406
 				<key>0</key>
@@ -423,6 +423,29 @@
423 423
 		</dict>
424 424
 		<dict>
425 425
 			<key>begin</key>
  426
+			<string>^\*</string>
  427
+			<key>beginCaptures</key>
  428
+			<dict>
  429
+				<key>0</key>
  430
+				<dict>
  431
+					<key>name</key>
  432
+					<string>punctuation.definition.comment.fortran</string>
  433
+				</dict>
  434
+			</dict>
  435
+			<key>end</key>
  436
+			<string>$\n?</string>
  437
+			<key>name</key>
  438
+			<string>comment.line.asterisk.fortran</string>
  439
+			<key>patterns</key>
  440
+			<array>
  441
+				<dict>
  442
+					<key>match</key>
  443
+					<string>\\\s*\n</string>
  444
+				</dict>
  445
+			</array>
  446
+		</dict>
  447
+		<dict>
  448
+			<key>begin</key>
426 449
 			<string>^\s*#\s*(error|warning)\b</string>
427 450
 			<key>captures</key>
428 451
 			<dict>

0 notes on commit a933236

Please sign in to comment.
Something went wrong with that request. Please try again.