equal
deleted
inserted
replaced
9 |
9 |
10 |
10 |
11 !PPToken class methodsFor:'initialization'! |
11 !PPToken class methodsFor:'initialization'! |
12 |
12 |
13 initialize |
13 initialize |
14 "Platform independent newline sequence. LF: Unix, CR+LF: Windows, and CR: Apple." |
14 "Platform independent newline sequence. LF: Unix, CR+LF: Windows, and CR: Apple." |
15 |
15 |
16 NewLineParser := (Character lf asParser) / (Character cr asParser , Character lf asParser optional) |
16 | cr lf | |
|
17 |
|
18 cr := Character codePoint: 13. |
|
19 lf := Character codePoint: 10. |
|
20 NewLineParser := lf asParser / (cr asParser , lf asParser optional) |
|
21 |
|
22 "Modified: / 04-10-2014 / 00:03:39 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
17 ! ! |
23 ! ! |
18 |
24 |
19 !PPToken class methodsFor:'instance creation'! |
25 !PPToken class methodsFor:'instance creation'! |
20 |
26 |
21 new |
27 new |
125 |
131 |
126 !PPToken methodsFor:'private'! |
132 !PPToken methodsFor:'private'! |
127 |
133 |
128 newline |
134 newline |
129 "Parser a platform independent newline sequence. LF: Unix, CR+LF: Windows, and CR: Apple." |
135 "Parser a platform independent newline sequence. LF: Unix, CR+LF: Windows, and CR: Apple." |
130 |cr| |
136 | cr lf | |
131 |
137 |
132 cr := Smalltalk isSmalltalkX |
138 cr := Character codePoint: 13. |
133 ifTrue:[Character return] |
139 lf := Character codePoint: 10. |
134 ifFalse:[Character cr]. |
140 ^ lf asParser |
135 ^ (Character lf asParser) |
141 / (cr asParser , lf asParser optional) |
136 / (cr asParser , Character lf asParser optional) |
142 |
|
143 "Modified: / 04-10-2014 / 00:02:15 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
137 ! ! |
144 ! ! |
138 |
145 |
139 !PPToken methodsFor:'querying'! |
146 !PPToken methodsFor:'querying'! |
140 |
147 |
141 column |
148 column |