author | Jan Vrany <jan.vrany@fit.cvut.cz> |
Thu, 14 Jun 2018 22:19:39 +0100 | |
branch | jv |
changeset 18227 | d25a407ba86d |
parent 18226 | 346376844040 |
child 19609 | a54d8409a28f |
permissions | -rw-r--r-- |
10022 | 1 |
" |
10067 | 2 |
COPYRIGHT (c) 2010 by Jan Vrany, SWING Research Group. CTU in Prague |
18226 | 3 |
COPYRIGHT (c) 2016 Jan Vrany |
10067 | 4 |
All Rights Reserved |
10022 | 5 |
|
10067 | 6 |
Permission is hereby granted, free of charge, to any person |
7 |
obtaining a copy of this software and associated documentation |
|
8 |
files (the 'Software'), to deal in the Software without |
|
9 |
restriction, including without limitation the rights to use, |
|
10 |
copy, modify, merge, publish, distribute, sublicense, and/or sell |
|
11 |
copies of the Software, and to permit persons to whom the |
|
12 |
Software is furnished to do so, subject to the following |
|
13 |
conditions: |
|
14 |
||
15 |
The above copyright notice and this permission notice shall be |
|
16 |
included in all copies or substantial portions of the Software. |
|
17 |
||
18 |
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, |
|
19 |
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES |
|
20 |
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
|
21 |
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT |
|
22 |
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, |
|
23 |
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
|
24 |
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
|
25 |
OTHER DEALINGS IN THE SOFTWARE. |
|
10022 | 26 |
" |
27 |
"{ Package: 'stx:libtool' }" |
|
28 |
||
15446 | 29 |
"{ NameSpace: Smalltalk }" |
30 |
||
10022 | 31 |
SyntaxHighlighter subclass:#SyntaxHighlighter2 |
13844 | 32 |
instanceVariableNames:'elements lastVariableElements lastSelectorElement |
33 |
ignoreBadIdentifier' |
|
10022 | 34 |
classVariableNames:'' |
35 |
poolDictionaries:'' |
|
36 |
category:'Interface-CodeView-Syntax' |
|
37 |
! |
|
38 |
||
39 |
!SyntaxHighlighter2 class methodsFor:'documentation'! |
|
40 |
||
41 |
copyright |
|
42 |
" |
|
10067 | 43 |
COPYRIGHT (c) 2010 by Jan Vrany, SWING Research Group. CTU in Prague |
18226 | 44 |
COPYRIGHT (c) 2016 Jan Vrany |
10067 | 45 |
All Rights Reserved |
46 |
||
47 |
Permission is hereby granted, free of charge, to any person |
|
48 |
obtaining a copy of this software and associated documentation |
|
49 |
files (the 'Software'), to deal in the Software without |
|
50 |
restriction, including without limitation the rights to use, |
|
51 |
copy, modify, merge, publish, distribute, sublicense, and/or sell |
|
52 |
copies of the Software, and to permit persons to whom the |
|
53 |
Software is furnished to do so, subject to the following |
|
54 |
conditions: |
|
10022 | 55 |
|
10067 | 56 |
The above copyright notice and this permission notice shall be |
57 |
included in all copies or substantial portions of the Software. |
|
58 |
||
59 |
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, |
|
60 |
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES |
|
61 |
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
|
62 |
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT |
|
63 |
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, |
|
64 |
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
|
65 |
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
|
66 |
OTHER DEALINGS IN THE SOFTWARE. |
|
10022 | 67 |
" |
15446 | 68 |
! |
69 |
||
70 |
documentation |
|
71 |
" |
|
72 |
A slightly improved syntax highlighter. |
|
73 |
||
74 |
In addition to the inherited colorization, this one also remembers |
|
75 |
so called 'syntax elements' (variable tokens and selectors) and remembers |
|
76 |
them in a list. |
|
77 |
This can be later used by the codeView to highlight uses of a clicked-on |
|
78 |
variable or a clicked-on selector. |
|
79 |
Also this list could (but is not, at the moment) be used to forward/backward |
|
80 |
search for the next use of some variable. |
|
81 |
||
82 |
[caveat:] |
|
83 |
This code has a smell: there is a lot of code duplication, |
|
84 |
and most can be moved to the superclass. Actually, there is propably no |
|
85 |
reason to have both classes around, so why not integrate all into the superclass. |
|
86 |
" |
|
10022 | 87 |
! ! |
88 |
||
89 |
!SyntaxHighlighter2 class methodsFor:'highlighting'! |
|
90 |
||
12636 | 91 |
format:aString parsingWith:aBlock in:aClass elementsInto:elements |
92 |
"common code for formatStatementList, formatExpression, ... |
|
93 |
format (recolor) whatever is parsed in aBlock (within the context of a given class). |
|
94 |
Return the text containing font changes and color information. |
|
95 |
As a side effect, put syntax elements into the passed in elements container |
|
96 |
(for element-highlighting in codeView2)" |
|
10022 | 97 |
|
15446 | 98 |
"/ cg: I smell a wumpus: I don't think, all of this must be redefined - most is already there in the superclass. |
99 |
||
100 |
|parser tree text| |
|
10022 | 101 |
|
102 |
aString isNil ifTrue:[^ nil]. |
|
103 |
||
104 |
parser := self for:(ReadStream on:aString string) in:aClass. |
|
105 |
parser elements: elements. |
|
106 |
parser ignoreErrors:true. |
|
107 |
parser ignoreWarnings:true. |
|
108 |
parser sourceText:(text := aString string asText). |
|
109 |
"/ use an array here - this can be changed much faster using #at:put: |
|
110 |
text emphasisCollection:(Array new:aString size). |
|
111 |
||
112 |
parser nextToken. |
|
12636 | 113 |
tree := aBlock value:parser. |
10022 | 114 |
"/ now, convert the emphasis-array to a runArray |
115 |
text emphasisCollection:(text emphasis asRunArray). |
|
116 |
||
117 |
tree == #Error ifTrue:[ |
|
15446 | 118 |
^ self colorize:text forErrorAtPosition:parser sourceStream position withOriginal:aString |
10022 | 119 |
]. |
120 |
^ text |
|
121 |
||
122 |
" |
|
123 |
self |
|
12636 | 124 |
formatStatementList:'(1 + 2) max:5. 1 + 2' |
125 |
in:UndefinedObject |
|
126 |
elementsInto:(OrderedCollection new). |
|
127 |
" |
|
128 |
! |
|
129 |
||
130 |
formatClassDefinition:aString in:aClass elementsInto: elements |
|
131 |
"format (recolor) a class definition expression in a given class. |
|
132 |
Return the text containing font changes and color information." |
|
133 |
||
134 |
^ self formatExpression:aString in:aClass elementsInto: elements |
|
135 |
||
136 |
"Created: / 10-04-2011 / 18:18:00 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
137 |
! |
|
138 |
||
139 |
formatExpression:aString in:aClass elementsInto: elements |
|
140 |
"format (recolor) an expression in a given class. |
|
141 |
Return the text containing font changes and color information." |
|
142 |
||
15446 | 143 |
"/ cg: I smell a wumpus: I don't think, all of this must be redefined - most is already there in the superclass. |
144 |
||
145 |
|parser tree text| |
|
13844 | 146 |
|
147 |
aString isNil ifTrue:[^ nil]. |
|
148 |
||
149 |
parser := self for:(ReadStream on:aString string) in:aClass. |
|
150 |
parser elements: elements. |
|
151 |
parser ignoreErrors:true. |
|
152 |
parser ignoreWarnings:true. |
|
153 |
parser sourceText:(text := aString string asText). |
|
154 |
"/ use an array here - this can be changed much faster using #at:put: |
|
155 |
text emphasisCollection:(Array new:aString size). |
|
156 |
||
157 |
parser nextToken. |
|
15580 | 158 |
[ |
159 |
tree := parser "expression"statementList. |
|
160 |
] on:ParseError do:[ |
|
161 |
tree := #Error |
|
162 |
]. |
|
13844 | 163 |
"/ now, convert the emphasis-array to a runArray |
164 |
text emphasisCollection:(text emphasis asRunArray). |
|
165 |
||
166 |
tree == #Error ifTrue:[ |
|
15446 | 167 |
^ self colorize:text forErrorAtPosition:parser sourceStream position withOriginal:aString |
13844 | 168 |
]. |
169 |
^ text |
|
12636 | 170 |
|
171 |
" |
|
172 |
self |
|
14299 | 173 |
formatExpression:'(1 + 2) max:5' |
174 |
in:UndefinedObject |
|
10022 | 175 |
" |
13844 | 176 |
|
177 |
"Created: / 25-07-2010 / 08:56:05 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
178 |
"Modified: / 25-07-2010 / 10:57:00 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
10022 | 179 |
! |
180 |
||
181 |
formatMethod:aString in:aClass using:preferencesOrNil elementsInto: elements |
|
182 |
"format (recolor) a method in a given class. |
|
183 |
Return the text containing font changes and color information." |
|
184 |
||
10152
561883853228
comment/format in: #formatMethod:in:using:elementsInto:
Claus Gittinger <cg@exept.de>
parents:
10150
diff
changeset
|
185 |
"/ obsolete interface |
10150
3792ee8840ea
added: #formatMethod:source:in:using:elementsInto:
Claus Gittinger <cg@exept.de>
parents:
10067
diff
changeset
|
186 |
^ self |
3792ee8840ea
added: #formatMethod:source:in:using:elementsInto:
Claus Gittinger <cg@exept.de>
parents:
10067
diff
changeset
|
187 |
formatMethod:nil |
3792ee8840ea
added: #formatMethod:source:in:using:elementsInto:
Claus Gittinger <cg@exept.de>
parents:
10067
diff
changeset
|
188 |
source:aString |
3792ee8840ea
added: #formatMethod:source:in:using:elementsInto:
Claus Gittinger <cg@exept.de>
parents:
10067
diff
changeset
|
189 |
in:aClass |
3792ee8840ea
added: #formatMethod:source:in:using:elementsInto:
Claus Gittinger <cg@exept.de>
parents:
10067
diff
changeset
|
190 |
using:preferencesOrNil elementsInto:elements |
3792ee8840ea
added: #formatMethod:source:in:using:elementsInto:
Claus Gittinger <cg@exept.de>
parents:
10067
diff
changeset
|
191 |
|
3792ee8840ea
added: #formatMethod:source:in:using:elementsInto:
Claus Gittinger <cg@exept.de>
parents:
10067
diff
changeset
|
192 |
"Created: / 25-07-2010 / 08:56:29 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
10152
561883853228
comment/format in: #formatMethod:in:using:elementsInto:
Claus Gittinger <cg@exept.de>
parents:
10150
diff
changeset
|
193 |
"Modified (comment): / 05-07-2011 / 11:07:50 / cg" |
10150
3792ee8840ea
added: #formatMethod:source:in:using:elementsInto:
Claus Gittinger <cg@exept.de>
parents:
10067
diff
changeset
|
194 |
! |
3792ee8840ea
added: #formatMethod:source:in:using:elementsInto:
Claus Gittinger <cg@exept.de>
parents:
10067
diff
changeset
|
195 |
|
3792ee8840ea
added: #formatMethod:source:in:using:elementsInto:
Claus Gittinger <cg@exept.de>
parents:
10067
diff
changeset
|
196 |
formatMethod:aMethodOrNil source:aString in:aClass using:preferencesOrNil elementsInto: elements |
3792ee8840ea
added: #formatMethod:source:in:using:elementsInto:
Claus Gittinger <cg@exept.de>
parents:
10067
diff
changeset
|
197 |
"format (recolor) a method in a given class. |
3792ee8840ea
added: #formatMethod:source:in:using:elementsInto:
Claus Gittinger <cg@exept.de>
parents:
10067
diff
changeset
|
198 |
Return the text containing font changes and color information." |
3792ee8840ea
added: #formatMethod:source:in:using:elementsInto:
Claus Gittinger <cg@exept.de>
parents:
10067
diff
changeset
|
199 |
|
15446 | 200 |
"/ cg: I smell a wumpus: I don't think, all of this must be redefined - most is already there in the superclass. |
201 |
||
202 |
|highlighter tree newText| |
|
10022 | 203 |
|
204 |
aString isNil ifTrue:[^ nil]. |
|
205 |
||
206 |
Error handle:[:ex | |
|
15446 | 207 |
"/ Transcript showCR:ex description. |
10022 | 208 |
(self parseErrorSignal handles:ex) ifFalse:[ |
15446 | 209 |
ex creator isHandled ifTrue:[ |
210 |
"/ Transcript showCR:'handled'. |
|
211 |
ex reject. |
|
212 |
]. |
|
10022 | 213 |
"Parse error may happen when re-formatting incomplete code while editing" |
214 |
('SyntaxHighlighter [info]: error during highlight: ' , ex description) infoPrintCR. |
|
215 |
"/ ex suspendedContext fullPrintAll. |
|
216 |
]. |
|
15446 | 217 |
highlighter notNil ifTrue:[ |
218 |
^ self colorize:(newText ? aString) forErrorAtPosition:highlighter sourceStream position withOriginal:aString |
|
219 |
]. |
|
10022 | 220 |
^ aString |
221 |
] do:[ |
|
15446 | 222 |
|sourceString| |
223 |
||
224 |
sourceString := aString string. |
|
225 |
newText := sourceString asUnicode16String asText. |
|
226 |
"/ use an array here (instead of the RunArray) - this can be changed much faster using #at:put: |
|
227 |
newText emphasisCollection:(Array new:sourceString size). |
|
228 |
||
229 |
highlighter := self for:(ReadStream on:sourceString) in:aClass. |
|
10022 | 230 |
highlighter elements: elements. |
231 |
preferencesOrNil notNil ifTrue:[highlighter preferences:preferencesOrNil]. |
|
232 |
"/ highlighter ignoreErrors:true. |
|
233 |
highlighter ignoreWarnings:true. |
|
15446 | 234 |
highlighter sourceText:newText. |
10022 | 235 |
|
236 |
tree := highlighter parseMethod. |
|
15446 | 237 |
newText := highlighter sourceText. "/ might have changed identity |
10022 | 238 |
"/ now, convert the emphasis-array to a runArray |
15446 | 239 |
newText emphasisCollection:(newText emphasis asRunArray). |
10022 | 240 |
|
241 |
tree == #Error ifTrue:[ |
|
15446 | 242 |
^ self colorize:newText forErrorAtPosition:highlighter sourceStream position withOriginal:aString |
243 |
]. |
|
244 |
^ newText |
|
245 |
] |
|
10022 | 246 |
|
247 |
" |
|
15446 | 248 |
self formatMethod:'foo |
10022 | 249 |
^ self bar:''hello''. |
250 |
||
251 |
' , (Character doubleQuote asString) , 'some comment' , (Character doubleQuote asString) , ' |
|
252 |
' |
|
253 |
in:UndefinedObject |
|
254 |
" |
|
255 |
||
256 |
"Modified: / 22-08-2006 / 13:32:04 / cg" |
|
10150
3792ee8840ea
added: #formatMethod:source:in:using:elementsInto:
Claus Gittinger <cg@exept.de>
parents:
10067
diff
changeset
|
257 |
"Created: / 05-07-2011 / 10:39:21 / cg" |
13844 | 258 |
"Modified: / 28-05-2013 / 22:45:02 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
12636 | 259 |
! |
260 |
||
16128
e7b59cfeb8f3
Added support for highlighting of a statement list
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
15720
diff
changeset
|
261 |
formatStatements:aString in:aClass elementsInto: elements |
12636 | 262 |
"format (recolor) a statement list in a given class. |
263 |
Return the text containing font changes and color information." |
|
264 |
||
265 |
^ self |
|
16128
e7b59cfeb8f3
Added support for highlighting of a statement list
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
15720
diff
changeset
|
266 |
format:aString parsingWith:[:parser | parser parseMethodBody] |
12636 | 267 |
in:aClass elementsInto:elements |
268 |
||
269 |
" |
|
270 |
self |
|
16128
e7b59cfeb8f3
Added support for highlighting of a statement list
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
15720
diff
changeset
|
271 |
formatStatements:'(1 + 2) max:5. 1 + 2' |
12636 | 272 |
in:UndefinedObject |
273 |
elementsInto:(OrderedCollection new). |
|
274 |
" |
|
16128
e7b59cfeb8f3
Added support for highlighting of a statement list
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
15720
diff
changeset
|
275 |
|
e7b59cfeb8f3
Added support for highlighting of a statement list
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
15720
diff
changeset
|
276 |
"Created: / 22-02-2016 / 21:09:52 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
10022 | 277 |
! ! |
278 |
||
279 |
!SyntaxHighlighter2 methodsFor:'accessing'! |
|
280 |
||
281 |
elements |
|
282 |
^ elements |
|
283 |
! |
|
284 |
||
15456 | 285 |
elements:aParseTreeIndexCollection |
10633 | 286 |
"the element collection, to collect variables, selectors etc. into" |
287 |
||
15456 | 288 |
elements := aParseTreeIndexCollection. |
10633 | 289 |
|
290 |
"Modified (comment): / 21-08-2011 / 09:13:31 / cg" |
|
13844 | 291 |
! |
292 |
||
293 |
tree: aParseNode |
|
294 |
super tree: aParseNode. |
|
295 |
elements tree: aParseNode |
|
296 |
||
297 |
"Created: / 16-02-2012 / 09:56:17 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
10022 | 298 |
! ! |
299 |
||
300 |
!SyntaxHighlighter2 methodsFor:'initialization'! |
|
301 |
||
302 |
initialize |
|
303 |
||
304 |
super initialize. |
|
13844 | 305 |
elements := ParseTreeIndex new. |
10633 | 306 |
lastVariableElements := Dictionary new. |
10022 | 307 |
|
308 |
"Created: / 14-02-2010 / 13:08:27 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
10633 | 309 |
"Modified: / 21-08-2011 / 09:37:35 / cg" |
13844 | 310 |
"Modified: / 16-02-2012 / 09:59:58 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
10022 | 311 |
! ! |
312 |
||
313 |
!SyntaxHighlighter2 methodsFor:'parsing-expressions'! |
|
314 |
||
13844 | 315 |
_binaryExpressionFor:receiverArg |
316 |
"parse a binary-expression; return a node-tree, nil or #Error" |
|
317 |
||
318 |
|receiver expr arg sel pos1 pos2 lno| |
|
319 |
||
320 |
receiver := receiverArg. |
|
321 |
(receiver == #Error) ifTrue:[^ #Error]. |
|
322 |
||
323 |
"special kludge: since Scanner cannot know if -digit is a binary |
|
324 |
expression or a negative constant, handle cases here" |
|
325 |
||
326 |
[(tokenType == #BinaryOperator) |
|
327 |
or:[(tokenType == $|) |
|
328 |
or:[(tokenType == $^ and:[parserFlags allowCaretAsBinop]) |
|
14384 | 329 |
or:[((tokenType == #Integer) or:[tokenType == #Float]) |
330 |
and:[tokenValue < 0]]]] |
|
13844 | 331 |
] whileTrue:[ |
14384 | 332 |
"/ kludge alarm: in a function-call argList, #, is not a binarySelector |
333 |
inFunctionCallArgument == true ifTrue:[ |
|
334 |
((tokenType == #BinaryOperator) and:[tokenName = ',']) ifTrue:[ |
|
335 |
^ receiver |
|
336 |
]. |
|
337 |
]. |
|
13844 | 338 |
|
14384 | 339 |
pos1 := tokenPosition. |
340 |
lno := tokenLineNr. |
|
13844 | 341 |
|
14384 | 342 |
"/ kludge alarm: bar, caret and minus are not scanned as binop |
343 |
(tokenType == $|) ifTrue:[ |
|
344 |
sel := '|'. |
|
345 |
sel := self selectorCheck:sel for:receiver position:tokenPosition to:tokenPosition. |
|
346 |
self nextToken. |
|
347 |
] ifFalse:[ |
|
348 |
(tokenType == $^) ifTrue:[ |
|
349 |
sel := '^'. |
|
350 |
sel := self selectorCheck:sel for:receiver position:tokenPosition to:tokenPosition. |
|
351 |
self nextToken. |
|
352 |
] ifFalse:[ |
|
353 |
(tokenType == #BinaryOperator) ifTrue:[ |
|
354 |
sel := tokenName. |
|
355 |
sel := self selectorCheck:sel for:receiver position:tokenPosition to:(tokenPosition + tokenName size - 1). |
|
356 |
self nextToken |
|
357 |
] ifFalse:[ |
|
358 |
sel := '-'. |
|
359 |
token := tokenValue := tokenValue negated. |
|
360 |
tokenPosition := tokenPosition + 1. "/ to skip the sign |
|
361 |
] |
|
362 |
]. |
|
363 |
]. |
|
13844 | 364 |
|
14384 | 365 |
pos2 := pos1 + sel size - 1. |
366 |
self markSelector:sel from:pos1 to:pos2 receiverNode:receiver. |
|
367 |
lastSelectorElement := nil. |
|
13844 | 368 |
|
14384 | 369 |
arg := self unaryExpression. |
370 |
(arg == #Error) ifTrue:[^ #Error]. |
|
13844 | 371 |
|
14384 | 372 |
expr := BinaryNode receiver:receiver selector:sel arg:arg fold:foldConstants. |
373 |
expr isErrorNode ifTrue:[ |
|
374 |
self parseError:(expr errorString) position:pos1 to:tokenPosition. |
|
375 |
self clearErrorFlag. "ok, user wants it - so he'll get it" |
|
376 |
expr := BinaryNode receiver:receiver selector:sel arg:arg fold:nil. |
|
377 |
]. |
|
378 |
expr lineNumber:lno. |
|
379 |
expr selectorPosition:pos1. |
|
13844 | 380 |
|
14384 | 381 |
self checkPlausibilityOf:expr from:pos1 to:pos2. |
382 |
parseForCode ifFalse:[ |
|
383 |
self rememberSelectorUsed:sel receiver:receiver |
|
384 |
]. |
|
385 |
receiver := expr. "/ for next message |
|
13844 | 386 |
]. |
387 |
^ receiver |
|
388 |
||
389 |
"Modified: / 09-01-1998 / 19:05:18 / stefan" |
|
390 |
"Modified: / 14-02-2010 / 17:54:53 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
391 |
"Modified: / 19-01-2012 / 10:46:49 / cg" |
|
392 |
"Created: / 16-02-2012 / 21:54:28 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
393 |
! |
|
394 |
||
395 |
_keywordExpressionFor:receiverArg |
|
396 |
"parse a keyword-expression; return a node-tree, nil or #Error. |
|
397 |
||
398 |
keywordExpression ::= binaryexpression |
|
14384 | 399 |
| { KEYWORD-PART binaryExpression } |
13844 | 400 |
" |
401 |
||
402 |
|expr receiver sel arg args posR1 posR2 pos1 pos2 lno positions constVal| |
|
403 |
||
404 |
receiver := receiverArg. |
|
405 |
posR1 := tokenPosition. |
|
406 |
(tokenType == #Keyword) ifFalse:[^ receiver]. |
|
407 |
||
408 |
pos1 := posR2 := tokenPosition. |
|
409 |
pos2 := tokenPosition + tokenName size - 1. |
|
410 |
positions := OrderedCollection with:(pos1 to:pos2). |
|
411 |
sel := tokenName. |
|
412 |
lno := tokenLineNr. |
|
413 |
self nextToken. |
|
414 |
arg := self binaryExpression. |
|
415 |
(arg == #Error) ifTrue:[^ #Error]. |
|
416 |
args := Array with:arg. |
|
417 |
[tokenType == #Keyword] whileTrue:[ |
|
14384 | 418 |
sel := sel , tokenName. |
419 |
pos2 := tokenPosition + tokenName size - 1. |
|
420 |
positions add:(tokenPosition to:pos2). |
|
421 |
self nextToken. |
|
422 |
arg := self binaryExpression. |
|
423 |
(arg == #Error) ifTrue:[^ #Error]. |
|
424 |
args := args copyWith:arg. |
|
13844 | 425 |
]. |
426 |
||
427 |
positions do:[:p | |
|
14384 | 428 |
self markSelector:sel from:p start to:p stop receiverNode:receiver. |
13844 | 429 |
]. |
430 |
lastSelectorElement := nil. |
|
431 |
sel := self selectorCheck:sel for:receiver positions:positions. |
|
432 |
||
433 |
ignoreWarnings ifFalse:[ |
|
14384 | 434 |
(Class definitionSelectors includes:sel) ifTrue:[ |
435 |
(receiver isVariable and:[receiver isUndeclared]) ifTrue:[ |
|
436 |
"this is not an error - the undefined class may be loaded after this code!!" |
|
437 |
self warning:('as yet undefined superclass: ' , receiver name) position:pos1 to:pos2. |
|
438 |
]. |
|
439 |
]. |
|
13844 | 440 |
]. |
441 |
||
442 |
expr := MessageNode receiver:receiver selector:sel args:args fold:foldConstants. |
|
443 |
expr isErrorNode ifTrue:[ |
|
14384 | 444 |
self parseError:(expr errorString) position:pos1 to:pos2. |
445 |
self clearErrorFlag. "ok, user wants it - so he'll get it" |
|
446 |
expr := MessageNode receiver:receiver selector:sel args:args fold:nil. |
|
13844 | 447 |
]. |
448 |
expr lineNumber:lno. |
|
449 |
self checkPlausibilityOf:expr from:pos1 to:pos2. |
|
450 |
parseForCode ifFalse:[ |
|
14384 | 451 |
self rememberSelectorUsed:sel receiver:receiver |
13844 | 452 |
]. |
453 |
||
454 |
"/ (contextToEvaluateIn isNil and:[selfValue isNil]) ifTrue:[ "/ do not check this for doits |
|
455 |
"/ receiver isSuper ifTrue:[ |
|
456 |
"/ sel ~= selector ifTrue:[ |
|
457 |
"/ self warnCommonMistake:'possible bad super message (selector should be same as in current method) ?' |
|
458 |
"/ position:posR1 to:posR2-1 |
|
459 |
"/ ]. |
|
460 |
"/ ]. |
|
461 |
"/ ]. |
|
462 |
"/ |
|
463 |
||
464 |
(sel = #ifTrue: or:[sel = #ifFalse: or:[sel = #ifTrue:ifFalse: or:[sel = #ifFalse:ifTrue:]]]) ifTrue:[ |
|
14384 | 465 |
(expr receiver withConstantValueDo:[:val | constVal := val]) ifTrue:[ |
466 |
|indexOfArgNotExecuted| |
|
13844 | 467 |
|
14384 | 468 |
"/ receiver evaluates to a constant |
469 |
constVal == true ifTrue:[ |
|
470 |
(sel startsWith: #ifFalse:) ifTrue:[ |
|
471 |
indexOfArgNotExecuted := 1. |
|
472 |
] ifFalse:[ |
|
473 |
indexOfArgNotExecuted := 2. |
|
474 |
] |
|
475 |
]. |
|
476 |
constVal == false ifTrue:[ |
|
477 |
(sel startsWith: #ifTrue:) ifTrue:[ |
|
478 |
indexOfArgNotExecuted := 1. |
|
479 |
] ifFalse:[ |
|
480 |
indexOfArgNotExecuted := 2. |
|
481 |
] |
|
482 |
]. |
|
483 |
indexOfArgNotExecuted == 2 ifTrue:[ |
|
484 |
args size == 1 ifTrue:[ indexOfArgNotExecuted := nil] |
|
485 |
]. |
|
13844 | 486 |
|
14384 | 487 |
indexOfArgNotExecuted notNil ifTrue:[ |
488 |
|argIsNotExecuted| |
|
13844 | 489 |
|
14384 | 490 |
"/ self warning:'receiver is constant; arg',indexOfArgNotExecuted printString,' is never executed' position:pos1 to:tokenPosition. |
491 |
argIsNotExecuted := expr args at:indexOfArgNotExecuted. |
|
14489 | 492 |
argIsNotExecuted realNode isBlockNode ifTrue:[ |
14384 | 493 |
self markCommentFrom:argIsNotExecuted startPosition to:argIsNotExecuted endPosition. |
494 |
]. |
|
495 |
]. |
|
496 |
]. |
|
13844 | 497 |
]. |
498 |
||
499 |
(ignoreErrors or:[ignoreWarnings]) ifFalse:[ |
|
14384 | 500 |
(sel = #and: or:[sel = #or:]) ifTrue:[ |
501 |
expr arg1 isBlock ifFalse:[ |
|
502 |
(expr arg1 isVariable |
|
503 |
and:[ (expr arg1 name asLowercase includesString:'block')]) ifFalse:[ |
|
504 |
self warnCommonMistake:'(possible common mistake) missing block brackets ?' |
|
505 |
position:pos2+1 to:tokenPosition-1 |
|
506 |
] |
|
507 |
]. |
|
508 |
^ expr. |
|
509 |
]. |
|
13844 | 510 |
|
14384 | 511 |
(sel = #whileTrue: or:[sel = #whileFalse:]) ifTrue:[ |
512 |
expr receiver isBlock ifFalse:[ |
|
513 |
(expr receiver isVariable |
|
514 |
and:[ (expr receiver name asLowercase includesString:'block')]) ifFalse:[ |
|
515 |
self warnCommonMistake:'(possible common mistake) missing block brackets ?' |
|
516 |
position:pos1 to:pos2 |
|
517 |
] |
|
518 |
]. |
|
519 |
^ expr. |
|
520 |
]. |
|
13844 | 521 |
|
14384 | 522 |
(sel = #ifTrue: or:[sel = #ifFalse:]) ifTrue:[ |
523 |
expr receiver isMessage ifTrue:[ |
|
524 |
(expr receiver selector = #whileTrue or:[expr receiver selector = #whileFalse]) ifTrue:[ |
|
525 |
self warnCommonMistake:'strange receiver expression' |
|
526 |
position:pos1 to:pos2 |
|
527 |
]. |
|
528 |
]. |
|
529 |
^ expr |
|
530 |
]. |
|
13844 | 531 |
]. |
532 |
||
533 |
^ expr. |
|
534 |
||
535 |
"Modified: / 14-02-2010 / 17:58:40 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
536 |
"Modified: / 19-01-2012 / 10:47:01 / cg" |
|
537 |
"Created: / 16-02-2012 / 21:54:35 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
538 |
! |
|
539 |
||
540 |
_unaryExpressionFor:receiverArg |
|
541 |
"parse a unary-expression; return a node-tree, nil or #Error" |
|
542 |
||
543 |
|receiver expr sel pos pos2 lNr arguments| |
|
544 |
||
545 |
receiver := receiverArg. |
|
546 |
(receiver == #Error) ifTrue:[^ #Error]. |
|
547 |
||
548 |
[ self isValidUnarySelector:tokenType ] whileTrue:[ |
|
14384 | 549 |
pos := tokenPosition. |
550 |
pos2 := pos + tokenName size - 1. |
|
551 |
lNr := tokenLineNr. |
|
552 |
sel := tokenName. |
|
13844 | 553 |
|
14384 | 554 |
self markSelector:sel from:pos to:pos2 receiverNode:receiver. |
555 |
lastSelectorElement := nil. |
|
13844 | 556 |
|
14384 | 557 |
self nextToken. |
558 |
tokenType == $( ifTrue:[ |
|
559 |
parserFlags allowSqueakExtensions == true ifTrue:[ |
|
560 |
"/ croquet/squeak extension - c/java-style arguments |
|
561 |
arguments := self functionCallArgList. |
|
562 |
"/ synthetic selector: foo[:[with:[with:[...]]]] |
|
563 |
arguments notEmpty ifTrue:[ |
|
564 |
sel := sel , ':'. |
|
565 |
arguments size - 1 timesRepeat:[ sel := sel , 'with:' ]. |
|
566 |
]. |
|
567 |
sel := self selectorCheck:sel for:receiver position:pos to:pos2. |
|
568 |
expr := MessageNode receiver:receiver selector:sel args:arguments fold:foldConstants. |
|
569 |
expr isErrorNode ifTrue:[ |
|
570 |
self parseError:(expr errorString) position:pos to:pos2. |
|
571 |
self clearErrorFlag. "ok, user wants it - so he'll get it" |
|
572 |
expr := MessageNode receiver:receiver selector:sel args:arguments fold:nil. |
|
573 |
]. |
|
574 |
expr lineNumber:lNr. |
|
575 |
self checkPlausibilityOf:expr from:pos to:pos2. |
|
576 |
parseForCode ifFalse:[ |
|
577 |
self rememberSelectorUsed:sel receiver:receiver |
|
578 |
]. |
|
579 |
^ expr. |
|
580 |
]. |
|
581 |
]. |
|
13844 | 582 |
|
14384 | 583 |
sel := self selectorCheck:sel for:receiver position:pos to:pos2. |
584 |
expr := UnaryNode receiver:receiver selector:sel fold:foldConstants. |
|
585 |
expr isErrorNode ifTrue:[ |
|
586 |
self warning:(expr errorString , '.\\If you proceed, that error will happen at runtime.') withCRs position:pos to:pos2. |
|
587 |
self clearErrorFlag. "ok, user wants it - so he'll get it" |
|
588 |
expr := UnaryNode receiver:receiver selector:sel fold:nil. |
|
589 |
]. |
|
590 |
expr lineNumber:lNr. |
|
13844 | 591 |
|
14384 | 592 |
self checkPlausibilityOf:expr from:pos to:pos2. |
593 |
parseForCode ifFalse:[ |
|
594 |
self rememberSelectorUsed:sel receiver:receiver |
|
595 |
]. |
|
13844 | 596 |
|
14384 | 597 |
receiver := expr. "/ for next message |
13844 | 598 |
]. |
599 |
^ receiver |
|
600 |
||
601 |
"Modified: / 14-02-2010 / 17:56:21 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
602 |
"Modified: / 19-01-2012 / 10:47:37 / cg" |
|
603 |
"Created: / 16-02-2012 / 21:54:45 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
604 |
! |
|
605 |
||
606 |
binaryExpression |
|
607 |
| node savedLastSelectorElement | |
|
608 |
||
609 |
savedLastSelectorElement := lastSelectorElement. |
|
610 |
lastSelectorElement := nil. |
|
611 |
node := super binaryExpression. |
|
612 |
(lastSelectorElement notNil and:[node ~~ #Error and:[node isMessage]]) ifTrue:[ |
|
613 |
lastSelectorElement node parent: node. |
|
614 |
]. |
|
615 |
lastSelectorElement := savedLastSelectorElement. |
|
616 |
^node |
|
617 |
||
618 |
"Modified: / 19-01-2000 / 16:22:16 / cg" |
|
619 |
"Created: / 16-02-2012 / 21:56:51 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
620 |
! |
|
621 |
||
10022 | 622 |
binaryExpressionFor:receiverArg |
623 |
"parse a binary-expression; return a node-tree, nil or #Error" |
|
624 |
||
11152
c9a386e4f1e0
refactored plausibility checks
Claus Gittinger <cg@exept.de>
parents:
10882
diff
changeset
|
625 |
|receiver expr arg sel pos1 pos2 lno| |
10022 | 626 |
|
627 |
receiver := receiverArg. |
|
628 |
(receiver == #Error) ifTrue:[^ #Error]. |
|
629 |
||
630 |
"special kludge: since Scanner cannot know if -digit is a binary |
|
631 |
expression or a negative constant, handle cases here" |
|
632 |
||
633 |
[(tokenType == #BinaryOperator) |
|
634 |
or:[(tokenType == $|) |
|
635 |
or:[(tokenType == $^ and:[parserFlags allowCaretAsBinop]) |
|
636 |
or:[((tokenType == #Integer) or:[tokenType == #Float]) |
|
637 |
and:[tokenValue < 0]]]] |
|
638 |
] whileTrue:[ |
|
639 |
"/ kludge alarm: in a function-call argList, #, is not a binarySelector |
|
640 |
inFunctionCallArgument == true ifTrue:[ |
|
641 |
((tokenType == #BinaryOperator) and:[tokenName = ',']) ifTrue:[ |
|
642 |
^ receiver |
|
643 |
]. |
|
644 |
]. |
|
645 |
||
646 |
pos1 := tokenPosition. |
|
647 |
lno := tokenLineNr. |
|
648 |
||
649 |
"/ kludge alarm: bar, caret and minus are not scanned as binop |
|
650 |
(tokenType == $|) ifTrue:[ |
|
651 |
sel := '|'. |
|
652 |
sel := self selectorCheck:sel for:receiver position:tokenPosition to:tokenPosition. |
|
653 |
self nextToken. |
|
654 |
] ifFalse:[ |
|
655 |
(tokenType == $^) ifTrue:[ |
|
656 |
sel := '^'. |
|
657 |
sel := self selectorCheck:sel for:receiver position:tokenPosition to:tokenPosition. |
|
658 |
self nextToken. |
|
659 |
] ifFalse:[ |
|
660 |
(tokenType == #BinaryOperator) ifTrue:[ |
|
661 |
sel := tokenName. |
|
662 |
sel := self selectorCheck:sel for:receiver position:tokenPosition to:(tokenPosition + tokenName size - 1). |
|
663 |
self nextToken |
|
664 |
] ifFalse:[ |
|
665 |
sel := '-'. |
|
666 |
token := tokenValue := tokenValue negated. |
|
667 |
tokenPosition := tokenPosition + 1. "/ to skip the sign |
|
668 |
] |
|
669 |
]. |
|
670 |
]. |
|
671 |
||
672 |
pos2 := pos1 + sel size - 1. |
|
673 |
self markSelector:sel from:pos1 to:pos2 receiverNode:receiver. |
|
674 |
lastSelectorElement := nil. |
|
675 |
||
676 |
arg := self unaryExpression. |
|
677 |
(arg == #Error) ifTrue:[^ #Error]. |
|
678 |
||
679 |
expr := BinaryNode receiver:receiver selector:sel arg:arg fold:foldConstants. |
|
680 |
expr isErrorNode ifTrue:[ |
|
681 |
self parseError:(expr errorString) position:pos1 to:tokenPosition. |
|
14384 | 682 |
self clearErrorFlag. "ok, user wants it - so he'll get it" |
10022 | 683 |
expr := BinaryNode receiver:receiver selector:sel arg:arg fold:nil. |
684 |
]. |
|
685 |
expr lineNumber:lno. |
|
686 |
expr selectorPosition:pos1. |
|
687 |
||
11152
c9a386e4f1e0
refactored plausibility checks
Claus Gittinger <cg@exept.de>
parents:
10882
diff
changeset
|
688 |
self checkPlausibilityOf:expr from:pos1 to:pos2. |
10022 | 689 |
receiver := expr. "/ for next message |
690 |
]. |
|
691 |
^ receiver |
|
692 |
||
693 |
"Modified: / 09-01-1998 / 19:05:18 / stefan" |
|
694 |
"Modified: / 14-02-2010 / 17:54:53 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
11152
c9a386e4f1e0
refactored plausibility checks
Claus Gittinger <cg@exept.de>
parents:
10882
diff
changeset
|
695 |
"Modified: / 19-01-2012 / 10:46:49 / cg" |
10022 | 696 |
! |
697 |
||
698 |
expression |
|
13844 | 699 |
| node savedLastSelectorElement | |
10022 | 700 |
|
13844 | 701 |
savedLastSelectorElement := lastSelectorElement. |
702 |
lastSelectorElement := nil. |
|
15456 | 703 |
|
13844 | 704 |
node := super expression. |
705 |
((node ~~ #Error) and:[node isMessage]) ifTrue:[ |
|
706 |
[ lastSelectorElement notNil ] whileTrue:[ |
|
707 |
lastSelectorElement node parent: node. |
|
15456 | 708 |
lastSelectorElement := lastSelectorElement previousElement. |
10022 | 709 |
]. |
710 |
]. |
|
13844 | 711 |
lastSelectorElement := savedLastSelectorElement. |
712 |
^node |
|
10022 | 713 |
|
714 |
"Modified: / 19-01-2000 / 16:22:16 / cg" |
|
13844 | 715 |
"Modified: / 16-02-2012 / 23:39:15 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
10022 | 716 |
! |
717 |
||
718 |
keywordExpressionFor:receiverArg |
|
719 |
"parse a keyword-expression; return a node-tree, nil or #Error. |
|
720 |
||
721 |
keywordExpression ::= binaryexpression |
|
722 |
| { KEYWORD-PART binaryExpression } |
|
723 |
" |
|
724 |
||
11152
c9a386e4f1e0
refactored plausibility checks
Claus Gittinger <cg@exept.de>
parents:
10882
diff
changeset
|
725 |
|expr receiver sel arg args posR1 posR2 pos1 pos2 lno positions constVal| |
10022 | 726 |
|
727 |
receiver := receiverArg. |
|
728 |
posR1 := tokenPosition. |
|
729 |
(tokenType == #Keyword) ifFalse:[^ receiver]. |
|
730 |
||
731 |
pos1 := posR2 := tokenPosition. |
|
732 |
pos2 := tokenPosition + tokenName size - 1. |
|
733 |
positions := OrderedCollection with:(pos1 to:pos2). |
|
734 |
sel := tokenName. |
|
735 |
lno := tokenLineNr. |
|
736 |
self nextToken. |
|
737 |
arg := self binaryExpression. |
|
738 |
(arg == #Error) ifTrue:[^ #Error]. |
|
739 |
args := Array with:arg. |
|
740 |
[tokenType == #Keyword] whileTrue:[ |
|
741 |
sel := sel , tokenName. |
|
742 |
pos2 := tokenPosition + tokenName size - 1. |
|
743 |
positions add:(tokenPosition to:pos2). |
|
744 |
self nextToken. |
|
745 |
arg := self binaryExpression. |
|
746 |
(arg == #Error) ifTrue:[^ #Error]. |
|
747 |
args := args copyWith:arg. |
|
748 |
]. |
|
749 |
||
750 |
positions do:[:p | |
|
751 |
self markSelector:sel from:p start to:p stop receiverNode:receiver. |
|
752 |
]. |
|
753 |
lastSelectorElement := nil. |
|
754 |
sel := self selectorCheck:sel for:receiver positions:positions. |
|
755 |
||
756 |
ignoreWarnings ifFalse:[ |
|
757 |
(Class definitionSelectors includes:sel) ifTrue:[ |
|
758 |
(receiver isVariable and:[receiver isUndeclared]) ifTrue:[ |
|
759 |
"this is not an error - the undefined class may be loaded after this code!!" |
|
760 |
self warning:('as yet undefined superclass: ' , receiver name) position:pos1 to:pos2. |
|
761 |
]. |
|
762 |
]. |
|
763 |
]. |
|
764 |
||
765 |
expr := MessageNode receiver:receiver selector:sel args:args fold:foldConstants. |
|
766 |
expr isErrorNode ifTrue:[ |
|
767 |
self parseError:(expr errorString) position:pos1 to:pos2. |
|
14384 | 768 |
self clearErrorFlag. "ok, user wants it - so he'll get it" |
10022 | 769 |
expr := MessageNode receiver:receiver selector:sel args:args fold:nil. |
770 |
]. |
|
771 |
expr lineNumber:lno. |
|
11152
c9a386e4f1e0
refactored plausibility checks
Claus Gittinger <cg@exept.de>
parents:
10882
diff
changeset
|
772 |
self checkPlausibilityOf:expr from:pos1 to:pos2. |
10022 | 773 |
|
774 |
"/ (contextToEvaluateIn isNil and:[selfValue isNil]) ifTrue:[ "/ do not check this for doits |
|
775 |
"/ receiver isSuper ifTrue:[ |
|
776 |
"/ sel ~= selector ifTrue:[ |
|
777 |
"/ self warnCommonMistake:'possible bad super message (selector should be same as in current method) ?' |
|
778 |
"/ position:posR1 to:posR2-1 |
|
779 |
"/ ]. |
|
780 |
"/ ]. |
|
781 |
"/ ]. |
|
782 |
"/ |
|
783 |
||
784 |
(sel = #ifTrue: or:[sel = #ifFalse: or:[sel = #ifTrue:ifFalse: or:[sel = #ifFalse:ifTrue:]]]) ifTrue:[ |
|
785 |
(expr receiver withConstantValueDo:[:val | constVal := val]) ifTrue:[ |
|
786 |
|indexOfArgNotExecuted| |
|
787 |
||
788 |
"/ receiver evaluates to a constant |
|
789 |
constVal == true ifTrue:[ |
|
790 |
(sel startsWith: #ifFalse:) ifTrue:[ |
|
791 |
indexOfArgNotExecuted := 1. |
|
792 |
] ifFalse:[ |
|
793 |
indexOfArgNotExecuted := 2. |
|
794 |
] |
|
795 |
]. |
|
796 |
constVal == false ifTrue:[ |
|
797 |
(sel startsWith: #ifTrue:) ifTrue:[ |
|
798 |
indexOfArgNotExecuted := 1. |
|
799 |
] ifFalse:[ |
|
800 |
indexOfArgNotExecuted := 2. |
|
801 |
] |
|
802 |
]. |
|
803 |
indexOfArgNotExecuted == 2 ifTrue:[ |
|
804 |
args size == 1 ifTrue:[ indexOfArgNotExecuted := nil] |
|
805 |
]. |
|
806 |
||
807 |
indexOfArgNotExecuted notNil ifTrue:[ |
|
808 |
|argIsNotExecuted| |
|
809 |
||
810 |
"/ self warning:'receiver is constant; arg',indexOfArgNotExecuted printString,' is never executed' position:pos1 to:tokenPosition. |
|
811 |
argIsNotExecuted := expr args at:indexOfArgNotExecuted. |
|
14489 | 812 |
argIsNotExecuted realNode isBlockNode ifTrue:[ |
10022 | 813 |
self markCommentFrom:argIsNotExecuted startPosition to:argIsNotExecuted endPosition. |
814 |
]. |
|
815 |
]. |
|
816 |
]. |
|
817 |
]. |
|
818 |
||
819 |
(ignoreErrors or:[ignoreWarnings]) ifFalse:[ |
|
820 |
(sel = #and: or:[sel = #or:]) ifTrue:[ |
|
821 |
expr arg1 isBlock ifFalse:[ |
|
822 |
(expr arg1 isVariable |
|
823 |
and:[ (expr arg1 name asLowercase includesString:'block')]) ifFalse:[ |
|
824 |
self warnCommonMistake:'(possible common mistake) missing block brackets ?' |
|
825 |
position:pos2+1 to:tokenPosition-1 |
|
826 |
] |
|
827 |
]. |
|
828 |
^ expr. |
|
829 |
]. |
|
830 |
||
831 |
(sel = #whileTrue: or:[sel = #whileFalse:]) ifTrue:[ |
|
832 |
expr receiver isBlock ifFalse:[ |
|
833 |
(expr receiver isVariable |
|
834 |
and:[ (expr receiver name asLowercase includesString:'block')]) ifFalse:[ |
|
835 |
self warnCommonMistake:'(possible common mistake) missing block brackets ?' |
|
836 |
position:pos1 to:pos2 |
|
837 |
] |
|
838 |
]. |
|
839 |
^ expr. |
|
840 |
]. |
|
841 |
||
842 |
(sel = #ifTrue: or:[sel = #ifFalse:]) ifTrue:[ |
|
843 |
expr receiver isMessage ifTrue:[ |
|
844 |
(expr receiver selector = #whileTrue or:[expr receiver selector = #whileFalse]) ifTrue:[ |
|
845 |
self warnCommonMistake:'strange receiver expression' |
|
846 |
position:pos1 to:pos2 |
|
847 |
]. |
|
848 |
]. |
|
849 |
^ expr |
|
850 |
]. |
|
851 |
]. |
|
852 |
||
853 |
^ expr. |
|
854 |
||
855 |
"Modified: / 14-02-2010 / 17:58:40 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
11152
c9a386e4f1e0
refactored plausibility checks
Claus Gittinger <cg@exept.de>
parents:
10882
diff
changeset
|
856 |
"Modified: / 19-01-2012 / 10:47:01 / cg" |
10022 | 857 |
! |
858 |
||
859 |
unaryExpressionFor:receiverArg |
|
860 |
"parse a unary-expression; return a node-tree, nil or #Error" |
|
861 |
||
13844 | 862 |
|receiver expr sel pos pos2 lNr arguments savedLastSelectorElement| |
10022 | 863 |
|
13844 | 864 |
savedLastSelectorElement := lastSelectorElement. |
10022 | 865 |
receiver := receiverArg. |
866 |
(receiver == #Error) ifTrue:[^ #Error]. |
|
867 |
||
868 |
[ self isValidUnarySelector:tokenType ] whileTrue:[ |
|
14384 | 869 |
pos := tokenPosition. |
870 |
pos2 := pos + tokenName size - 1. |
|
871 |
lNr := tokenLineNr. |
|
872 |
sel := tokenName. |
|
10022 | 873 |
|
14384 | 874 |
lastSelectorElement := nil. |
875 |
self markSelector:sel from:pos to:pos2 receiverNode:receiver. |
|
10022 | 876 |
|
14384 | 877 |
self nextToken. |
878 |
tokenType == $( ifTrue:[ |
|
879 |
parserFlags allowSqueakExtensions == true ifTrue:[ |
|
880 |
"/ croquet/squeak extension - c/java-style arguments |
|
881 |
arguments := self functionCallArgList. |
|
882 |
"/ synthetic selector: foo[:[with:[with:[...]]]] |
|
883 |
arguments notEmpty ifTrue:[ |
|
884 |
sel := sel , ':'. |
|
885 |
arguments size - 1 timesRepeat:[ sel := sel , 'with:' ]. |
|
886 |
]. |
|
887 |
sel := self selectorCheck:sel for:receiver position:pos to:pos2. |
|
888 |
expr := MessageNode receiver:receiver selector:sel args:arguments fold:foldConstants. |
|
889 |
expr isErrorNode ifTrue:[ |
|
890 |
self parseError:(expr errorString) position:pos to:pos2. |
|
891 |
self clearErrorFlag. "ok, user wants it - so he'll get it" |
|
892 |
expr := MessageNode receiver:receiver selector:sel args:arguments fold:nil. |
|
893 |
]. |
|
894 |
lastSelectorElement node parent: expr. |
|
895 |
expr lineNumber:lNr. |
|
896 |
self checkPlausibilityOf:expr from:pos to:pos2. |
|
897 |
parseForCode ifFalse:[ |
|
898 |
self rememberSelectorUsed:sel receiver:receiver |
|
899 |
]. |
|
900 |
^ expr. |
|
901 |
]. |
|
902 |
]. |
|
10022 | 903 |
|
14384 | 904 |
sel := self selectorCheck:sel for:receiver position:pos to:pos2. |
905 |
expr := UnaryNode receiver:receiver selector:sel fold:foldConstants. |
|
906 |
expr isErrorNode ifTrue:[ |
|
907 |
self warning:(expr errorString , '.\\If you proceed, that error will happen at runtime.') withCRs position:pos to:pos2. |
|
908 |
self clearErrorFlag. "ok, user wants it - so he'll get it" |
|
909 |
expr := UnaryNode receiver:receiver selector:sel fold:nil. |
|
910 |
]. |
|
911 |
expr lineNumber:lNr. |
|
912 |
lastSelectorElement node parent: expr. |
|
10022 | 913 |
|
14384 | 914 |
self checkPlausibilityOf:expr from:pos to:pos2. |
915 |
parseForCode ifFalse:[ |
|
916 |
self rememberSelectorUsed:sel receiver:receiver |
|
917 |
]. |
|
10022 | 918 |
|
14384 | 919 |
receiver := expr. "/ for next message |
10022 | 920 |
]. |
13844 | 921 |
lastSelectorElement := savedLastSelectorElement. |
10022 | 922 |
^ receiver |
923 |
||
11152
c9a386e4f1e0
refactored plausibility checks
Claus Gittinger <cg@exept.de>
parents:
10882
diff
changeset
|
924 |
"Modified: / 19-01-2012 / 10:47:37 / cg" |
13844 | 925 |
"Created: / 16-02-2012 / 23:50:17 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
10022 | 926 |
! ! |
927 |
||
928 |
!SyntaxHighlighter2 methodsFor:'syntax detection'! |
|
929 |
||
15456 | 930 |
markBlockArgumentIdentifierFrom:pos1 to:pos2 |
931 |
"in addition to marking, remember the variable reference" |
|
932 |
||
933 |
| node | |
|
934 |
||
935 |
super markBlockArgumentIdentifierFrom:pos1 to:pos2. |
|
936 |
||
937 |
node := VariableNode blockArgumentNamed:(sourceText string copyFrom: pos1 to: pos2). |
|
938 |
node block:currentBlock. |
|
939 |
self rememberVariableElementFor: node from:pos1 to:pos2 assigned:false |
|
940 |
! |
|
941 |
||
14056
1b0f6f3c4bbd
Cleanup - Use ParseTreeIndex consistently. Fixes some minor issues when building
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13844
diff
changeset
|
942 |
markLocalVariableDeclaration: name from:pos1 to:pos2 |
15456 | 943 |
"in addition to marking, remember the variable reference" |
944 |
||
14056
1b0f6f3c4bbd
Cleanup - Use ParseTreeIndex consistently. Fixes some minor issues when building
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13844
diff
changeset
|
945 |
| type node | |
13844 | 946 |
|
14056
1b0f6f3c4bbd
Cleanup - Use ParseTreeIndex consistently. Fixes some minor issues when building
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13844
diff
changeset
|
947 |
super markLocalVariableDeclaration: name from:pos1 to:pos2. |
1b0f6f3c4bbd
Cleanup - Use ParseTreeIndex consistently. Fixes some minor issues when building
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13844
diff
changeset
|
948 |
|
1b0f6f3c4bbd
Cleanup - Use ParseTreeIndex consistently. Fixes some minor issues when building
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13844
diff
changeset
|
949 |
type := currentBlock notNil ifTrue:[#BlockVariable] ifFalse:[#MethodVariable]. |
1b0f6f3c4bbd
Cleanup - Use ParseTreeIndex consistently. Fixes some minor issues when building
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13844
diff
changeset
|
950 |
node := VariableNode type: type name: name. |
15456 | 951 |
node block:currentBlock. "/ which is nil for method locals |
14056
1b0f6f3c4bbd
Cleanup - Use ParseTreeIndex consistently. Fixes some minor issues when building
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13844
diff
changeset
|
952 |
self rememberVariableElementFor: node from: pos1 to: pos2 assigned: false. |
1b0f6f3c4bbd
Cleanup - Use ParseTreeIndex consistently. Fixes some minor issues when building
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13844
diff
changeset
|
953 |
|
1b0f6f3c4bbd
Cleanup - Use ParseTreeIndex consistently. Fixes some minor issues when building
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13844
diff
changeset
|
954 |
"Created: / 25-02-2014 / 20:22:56 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
1b0f6f3c4bbd
Cleanup - Use ParseTreeIndex consistently. Fixes some minor issues when building
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13844
diff
changeset
|
955 |
! |
1b0f6f3c4bbd
Cleanup - Use ParseTreeIndex consistently. Fixes some minor issues when building
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13844
diff
changeset
|
956 |
|
1b0f6f3c4bbd
Cleanup - Use ParseTreeIndex consistently. Fixes some minor issues when building
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13844
diff
changeset
|
957 |
markMethodArgumentIdentifierFrom:pos1 to:pos2 |
15456 | 958 |
"in addition to marking, remember the variable reference" |
959 |
||
14056
1b0f6f3c4bbd
Cleanup - Use ParseTreeIndex consistently. Fixes some minor issues when building
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13844
diff
changeset
|
960 |
| node | |
1b0f6f3c4bbd
Cleanup - Use ParseTreeIndex consistently. Fixes some minor issues when building
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13844
diff
changeset
|
961 |
|
1b0f6f3c4bbd
Cleanup - Use ParseTreeIndex consistently. Fixes some minor issues when building
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13844
diff
changeset
|
962 |
super markMethodArgumentIdentifierFrom:pos1 to:pos2. |
1b0f6f3c4bbd
Cleanup - Use ParseTreeIndex consistently. Fixes some minor issues when building
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13844
diff
changeset
|
963 |
|
1b0f6f3c4bbd
Cleanup - Use ParseTreeIndex consistently. Fixes some minor issues when building
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13844
diff
changeset
|
964 |
node := VariableNode methodArgumentNamed:(sourceText string copyFrom: pos1 to: pos2). |
1b0f6f3c4bbd
Cleanup - Use ParseTreeIndex consistently. Fixes some minor issues when building
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13844
diff
changeset
|
965 |
self rememberVariableElementFor: node from:pos1 to:pos2 assigned:false |
13844 | 966 |
|
967 |
"Created: / 24-07-2010 / 09:25:12 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
968 |
"Modified: / 21-08-2011 / 09:27:26 / cg" |
|
14056
1b0f6f3c4bbd
Cleanup - Use ParseTreeIndex consistently. Fixes some minor issues when building
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13844
diff
changeset
|
969 |
"Modified: / 25-02-2014 / 12:15:59 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
10022 | 970 |
! |
971 |
||
972 |
markSelector:selectorString from:pos1 to:pos2 receiverNode:aReceiverNode |
|
12672 | 973 |
| element selectorSymbol | |
10022 | 974 |
|
13844 | 975 |
"Special hack for Java class references - I would like to have them |
976 |
marked specially (and not as an error when the class is not yet loaded - |
|
977 |
the code is correct as JavaClassAccessor loads it lazily" |
|
978 |
(aReceiverNode isJavaPackageReference) ifTrue:[ |
|
15456 | 979 |
self |
980 |
markFrom:pos1 to:pos2 |
|
981 |
withEmphasis:preferences globalClassIdentifierEmphasis |
|
982 |
color: preferences globalClassIdentifierColor |
|
13844 | 983 |
] ifFalse:[ |
15456 | 984 |
super markSelector:selectorString from:pos1 to:pos2 receiverNode:aReceiverNode. |
13844 | 985 |
]. |
986 |
||
12672 | 987 |
"don't create symbols for partial typed selectors" |
988 |
selectorSymbol := selectorString asSymbolIfInterned. |
|
10022 | 989 |
|
15714 | 990 |
element := elements newElementFor: (SelectorNode value: selectorSymbol ? selectorString from: pos1 to: pos2). |
13844 | 991 |
|
992 |
(lastSelectorElement notNil "and:[lastSelectorElement value = selectorString]") ifTrue:[ |
|
15456 | 993 |
lastSelectorElement nextElement: element. |
13844 | 994 |
]. |
10022 | 995 |
elements add: element. |
13844 | 996 |
lastSelectorElement := "(self isValidUnarySelector:tokenType)"false |
15456 | 997 |
ifTrue:[nil] |
998 |
ifFalse:[element]. |
|
10022 | 999 |
|
1000 |
"Created: / 14-02-2010 / 17:40:09 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1001 |
"Modified: / 14-02-2010 / 19:24:17 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
10633 | 1002 |
"Modified (format): / 21-08-2011 / 09:18:21 / cg" |
13844 | 1003 |
"Modified: / 19-04-2012 / 09:53:59 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
10633 | 1004 |
! |
1005 |
||
1006 |
markSelfFrom:pos1 to:pos2 |
|
15456 | 1007 |
"in addition to marking, remember the variable reference" |
1008 |
||
14056
1b0f6f3c4bbd
Cleanup - Use ParseTreeIndex consistently. Fixes some minor issues when building
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13844
diff
changeset
|
1009 |
| node | |
1b0f6f3c4bbd
Cleanup - Use ParseTreeIndex consistently. Fixes some minor issues when building
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13844
diff
changeset
|
1010 |
|
10633 | 1011 |
super markSelfFrom:pos1 to:pos2. |
14056
1b0f6f3c4bbd
Cleanup - Use ParseTreeIndex consistently. Fixes some minor issues when building
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13844
diff
changeset
|
1012 |
|
1b0f6f3c4bbd
Cleanup - Use ParseTreeIndex consistently. Fixes some minor issues when building
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13844
diff
changeset
|
1013 |
node := SelfNode new. |
1b0f6f3c4bbd
Cleanup - Use ParseTreeIndex consistently. Fixes some minor issues when building
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13844
diff
changeset
|
1014 |
node type: #Self. |
1b0f6f3c4bbd
Cleanup - Use ParseTreeIndex consistently. Fixes some minor issues when building
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13844
diff
changeset
|
1015 |
self rememberVariableElementFor: node from:pos1 to:pos2 assigned:false |
10633 | 1016 |
|
1017 |
"Created: / 21-08-2011 / 09:15:45 / cg" |
|
14056
1b0f6f3c4bbd
Cleanup - Use ParseTreeIndex consistently. Fixes some minor issues when building
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13844
diff
changeset
|
1018 |
"Modified: / 25-02-2014 / 21:56:47 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
1b0f6f3c4bbd
Cleanup - Use ParseTreeIndex consistently. Fixes some minor issues when building
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13844
diff
changeset
|
1019 |
! |
1b0f6f3c4bbd
Cleanup - Use ParseTreeIndex consistently. Fixes some minor issues when building
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13844
diff
changeset
|
1020 |
|
1b0f6f3c4bbd
Cleanup - Use ParseTreeIndex consistently. Fixes some minor issues when building
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13844
diff
changeset
|
1021 |
markSuperFrom:pos1 to:pos2 |
15456 | 1022 |
"in addition to marking, remember the variable reference" |
1023 |
||
14056
1b0f6f3c4bbd
Cleanup - Use ParseTreeIndex consistently. Fixes some minor issues when building
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13844
diff
changeset
|
1024 |
| node | |
1b0f6f3c4bbd
Cleanup - Use ParseTreeIndex consistently. Fixes some minor issues when building
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13844
diff
changeset
|
1025 |
|
1b0f6f3c4bbd
Cleanup - Use ParseTreeIndex consistently. Fixes some minor issues when building
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13844
diff
changeset
|
1026 |
super markSuperFrom:pos1 to:pos2. |
1b0f6f3c4bbd
Cleanup - Use ParseTreeIndex consistently. Fixes some minor issues when building
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13844
diff
changeset
|
1027 |
|
1b0f6f3c4bbd
Cleanup - Use ParseTreeIndex consistently. Fixes some minor issues when building
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13844
diff
changeset
|
1028 |
node := SuperNode new. |
1b0f6f3c4bbd
Cleanup - Use ParseTreeIndex consistently. Fixes some minor issues when building
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13844
diff
changeset
|
1029 |
node type: #Super. |
1b0f6f3c4bbd
Cleanup - Use ParseTreeIndex consistently. Fixes some minor issues when building
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13844
diff
changeset
|
1030 |
self rememberVariableElementFor: node from:pos1 to:pos2 assigned:false |
1b0f6f3c4bbd
Cleanup - Use ParseTreeIndex consistently. Fixes some minor issues when building
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13844
diff
changeset
|
1031 |
|
1b0f6f3c4bbd
Cleanup - Use ParseTreeIndex consistently. Fixes some minor issues when building
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13844
diff
changeset
|
1032 |
"Created: / 25-02-2014 / 21:57:16 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
10022 | 1033 |
! |
1034 |
||
1035 |
markUnknownIdentifierFrom:pos1 to:pos2 |
|
1036 |
||
13844 | 1037 |
ignoreBadIdentifier == true ifTrue:[ ^ self ]. |
10022 | 1038 |
|
13844 | 1039 |
super markUnknownIdentifierFrom:pos1 to:pos2 |
1040 |
||
1041 |
"Created: / 31.3.1998 / 19:09:26 / cg" |
|
1042 |
"Modified: / 31.3.1998 / 19:10:30 / cg" |
|
10022 | 1043 |
! |
1044 |
||
12911 | 1045 |
markVariable:v from:pos1 to:pos2 assigned:assigned |
14056
1b0f6f3c4bbd
Cleanup - Use ParseTreeIndex consistently. Fixes some minor issues when building
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13844
diff
changeset
|
1046 |
self rememberVariableElementFor:v from:pos1 to:pos2 assigned:assigned. |
12911 | 1047 |
super markVariable:v from:pos1 to:pos2 assigned:assigned. |
10022 | 1048 |
|
1049 |
"Created: / 25-06-2010 / 13:03:37 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
10633 | 1050 |
"Modified: / 21-08-2011 / 09:26:30 / cg" |
14056
1b0f6f3c4bbd
Cleanup - Use ParseTreeIndex consistently. Fixes some minor issues when building
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13844
diff
changeset
|
1051 |
"Modified: / 25-02-2014 / 14:07:39 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
10633 | 1052 |
! |
1053 |
||
14056
1b0f6f3c4bbd
Cleanup - Use ParseTreeIndex consistently. Fixes some minor issues when building
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13844
diff
changeset
|
1054 |
rememberVariableElementFor:node from:pos1 to:pos2 assigned:assigned |
15473 | 1055 |
|name typeSymbol key element prev dict| |
15456 | 1056 |
|
1057 |
node startPosition: pos1 endPosition: pos2. |
|
12911 | 1058 |
|
14056
1b0f6f3c4bbd
Cleanup - Use ParseTreeIndex consistently. Fixes some minor issues when building
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13844
diff
changeset
|
1059 |
name := node name. |
15456 | 1060 |
typeSymbol := key := node type. |
15473 | 1061 |
|
15456 | 1062 |
(typeSymbol == #BlockArg or:[typeSymbol == #BlockVariable]) ifTrue:[ |
15473 | 1063 |
key := (typeSymbol -> currentBlock "node block") |
15456 | 1064 |
]. |
1065 |
||
15473 | 1066 |
dict := lastVariableElements at:key ifAbsentPut:[Dictionary new]. |
1067 |
prev := dict at:name ifAbsent:[nil]. |
|
12987 | 1068 |
(prev notNil and:[prev start == pos1]) ifTrue:[ |
15456 | 1069 |
"/ prev assigned:assigned. |
12987 | 1070 |
^ self |
1071 |
]. |
|
11458
8fdf55d6d1c8
changed: #rememberVariableElementFor:type:from:to:
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
1072 |
|
14056
1b0f6f3c4bbd
Cleanup - Use ParseTreeIndex consistently. Fixes some minor issues when building
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13844
diff
changeset
|
1073 |
element := elements newElementFor: node. |
10633 | 1074 |
|
15456 | 1075 |
prev notNil ifTrue:[prev nextElement:element]. |
15473 | 1076 |
dict at:name put:element. |
10633 | 1077 |
|
1078 |
elements add: element. |
|
1079 |
||
14056
1b0f6f3c4bbd
Cleanup - Use ParseTreeIndex consistently. Fixes some minor issues when building
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13844
diff
changeset
|
1080 |
"Created: / 25-02-2014 / 12:13:30 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
10022 | 1081 |
! ! |
1082 |
||
1083 |
!SyntaxHighlighter2 class methodsFor:'documentation'! |
|
1084 |
||
12984 | 1085 |
version |
15714 | 1086 |
^ '$Header$' |
12984 | 1087 |
! |
1088 |
||
10022 | 1089 |
version_CVS |
15714 | 1090 |
^ '$Header$' |
10022 | 1091 |
! |
1092 |
||
16128
e7b59cfeb8f3
Added support for highlighting of a statement list
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
15720
diff
changeset
|
1093 |
version_HG |
e7b59cfeb8f3
Added support for highlighting of a statement list
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
15720
diff
changeset
|
1094 |
|
e7b59cfeb8f3
Added support for highlighting of a statement list
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
15720
diff
changeset
|
1095 |
^ '$Changeset: <not expanded> $' |
e7b59cfeb8f3
Added support for highlighting of a statement list
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
15720
diff
changeset
|
1096 |
! |
e7b59cfeb8f3
Added support for highlighting of a statement list
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
15720
diff
changeset
|
1097 |
|
10022 | 1098 |
version_SVN |
15714 | 1099 |
^ '$Id$' |
10022 | 1100 |
! ! |
12636 | 1101 |