SyntaxHighlighter.st
changeset 1640 261459ccc704
parent 1636 98afdcdacde8
child 1684 e9d1d09ca914
--- a/SyntaxHighlighter.st	Tue Oct 18 20:47:16 2005 +0200
+++ b/SyntaxHighlighter.st	Fri Oct 21 10:51:31 2005 +0200
@@ -450,6 +450,29 @@
     "Modified: / 31.3.1998 / 18:02:52 / cg"
 !
 
+markParenthesisAt:pos
+    |colors clr em|
+
+    preferences emphasizeParenthesisLevel ifFalse:[^ self].
+
+    colors := Array 
+                with:(Color black)
+                with:(Color blue)
+                with:(Color green darkened)
+                with:(Color red darkened)
+                with:(Color yellow darkened).
+                        
+    clr := colors at:(colors size \\ parenthesisLevel + 1).
+    em := #normal.
+    parenthesisLevel > 1 ifTrue:[
+        em := #bold.
+    ].
+    self 
+        markFrom:pos to:pos 
+        withEmphasis:em 
+        color:clr
+!
+
 markPoolVariableIdentifierFrom:pos1 to:pos2
     self 
         markFrom:pos1 to:pos2 
@@ -658,5 +681,5 @@
 !SyntaxHighlighter class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libcomp/SyntaxHighlighter.st,v 1.48 2005-10-18 14:26:36 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libcomp/SyntaxHighlighter.st,v 1.49 2005-10-21 08:51:11 cg Exp $'
 ! !