checkin from browser
authorca
Thu, 02 Apr 1998 10:38:00 +0200
changeset 673 0c66b7cb1d2f
parent 672 392927bad277
child 674 332dbc0e9a98
checkin from browser
Parser.st
SyntaxHighlighter.st
--- a/Parser.st	Wed Apr 01 13:17:07 1998 +0200
+++ b/Parser.st	Thu Apr 02 10:38:00 1998 +0200
@@ -1717,6 +1717,9 @@
     "Created: / 31.3.1998 / 18:06:22 / cg"
 !
 
+markBracketAt:pos
+!
+
 markConstantFrom:pos1 to:pos2
 
     "Created: / 31.3.1998 / 18:06:24 / cg"
@@ -2758,32 +2761,34 @@
     (thisStatement == #Error) ifTrue:[^ #Error].
     firstStatement := thisStatement.
     [tokenType == $] ] whileFalse:[
-	(tokenType == $.) ifFalse:[
-	    ((tokenType == #EOF) or:[tokenType == $)]) ifTrue:[
-		self syntaxError:'missing '']'' in block'
-	    ] ifFalse:[
-		self syntaxError:'missing ''.'' in block'
-	    ].
-	    ^ #Error
-	] ifTrue:[
-	    prevStatement := thisStatement.
-	    self nextToken.
-	    tokenType == $] ifTrue:[
+        (tokenType == $.) ifFalse:[
+            ((tokenType == #EOF) or:[tokenType == $)]) ifTrue:[
+                self syntaxError:'missing '']'' in block'
+            ] ifFalse:[
+                self syntaxError:'missing ''.'' in block'
+            ].
+            ^ #Error
+        ] ifTrue:[
+            prevStatement := thisStatement.
+            self nextToken.
+            tokenType == $] ifTrue:[
 "
-		*** I had a warning here (since it was not defined
-		*** in the blue-book; but PD-code contains a lot of
-		*** code with periods at the end so that the warnings
-		*** became annoying
-
-		self warning:'period after last statement in block'.
+                *** I had a warning here (since it was not defined
+                *** in the blue-book; but PD-code contains a lot of
+                *** code with periods at the end so that the warnings
+                *** became annoying
+
+                self warning:'period after last statement in block'.
 "
-		^ firstStatement
-	    ].
-	    thisStatement := self statement.
-	    (thisStatement == #Error) ifTrue:[^ #Error].
-	    prevStatement nextStatement:thisStatement
-	]
+                self markBracketAt:tokenPosition.
+                ^ firstStatement
+            ].
+            thisStatement := self statement.
+            (thisStatement == #Error) ifTrue:[^ #Error].
+            prevStatement nextStatement:thisStatement
+        ]
     ].
+    self markBracketAt:tokenPosition.
     ^ firstStatement
 !
 
@@ -3768,6 +3773,7 @@
         ^ val
     ].
     (tokenType == $[ ) ifTrue:[
+        self markBracketAt:tokenPosition.
         val := self block.
         self nextToken.
         ((tokenType == $_) or:[tokenType == #':=']) ifTrue:[
@@ -4607,6 +4613,6 @@
 !Parser class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libcomp/Parser.st,v 1.161 1998-04-01 11:17:07 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libcomp/Parser.st,v 1.162 1998-04-02 08:38:00 ca Exp $'
 ! !
 Parser initialize!
--- a/SyntaxHighlighter.st	Wed Apr 01 13:17:07 1998 +0200
+++ b/SyntaxHighlighter.st	Thu Apr 02 10:38:00 1998 +0200
@@ -23,7 +23,7 @@
 		symbolColor symbolEmphasis selfColor selfEmphasis superColor
 		superEmphasis hereColor hereEmphasis thisContextColor
 		thisContextEmphasis booleanConstantColor booleanConstantEmphasis
-		constantColor constantEmphasis'
+		constantColor constantEmphasis bracketColor bracketEmphasis'
 	classVariableNames:''
 	poolDictionaries:''
 	category:'System-Compiler'
@@ -138,6 +138,8 @@
     constantColor := prefs constantColor.
     booleanConstantEmphasis := prefs booleanConstantEmphasis.
     booleanConstantColor := prefs booleanConstantColor.
+    bracketEmphasis := prefs bracketEmphasis.
+    bracketColor := prefs bracketColor.
 
     "Created: / 31.3.1998 / 15:12:55 / cg"
     "Modified: / 1.4.1998 / 12:57:48 / cg"
@@ -162,6 +164,15 @@
     "Modified: / 31.3.1998 / 19:36:44 / cg"
 !
 
+markBracketAt:pos
+    self 
+        markFrom:pos to:pos 
+        withEmphasis:bracketEmphasis color:bracketColor
+
+    "Created: / 31.3.1998 / 18:09:01 / cg"
+    "Modified: / 31.3.1998 / 19:36:44 / cg"
+!
+
 markCommentFrom:pos1 to:pos2
     self 
         markFrom:pos1 to:pos2 
@@ -313,5 +324,5 @@
 !SyntaxHighlighter class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libcomp/SyntaxHighlighter.st,v 1.5 1998-04-01 11:16:32 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libcomp/SyntaxHighlighter.st,v 1.6 1998-04-02 08:37:13 ca Exp $'
 ! !