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 | cr lf | |
16 | cr lf | |
16 cr := Character codePoint: 13. |
17 |
17 lf := Character codePoint: 10. |
18 cr := Character codePoint: 13. |
18 NewLineParser := lf asParser / (cr asParser , lf asParser optional) |
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>" |
|
23 ! ! |
19 ! ! |
24 |
20 |
25 !PPToken class methodsFor:'instance creation'! |
21 !PPToken class methodsFor:'instance creation'! |
26 |
22 |
27 new |
23 new |
41 on: aSequenceableCollection start: aStartInteger stop: aStopInteger value: anObject |
37 on: aSequenceableCollection start: aStartInteger stop: aStopInteger value: anObject |
42 ^ self basicNew |
38 ^ self basicNew |
43 initializeOn: aSequenceableCollection |
39 initializeOn: aSequenceableCollection |
44 start: aStartInteger stop: aStopInteger |
40 start: aStartInteger stop: aStopInteger |
45 value: anObject |
41 value: anObject |
|
42 ! ! |
|
43 |
|
44 !PPToken methodsFor:'*petitcompiler'! |
|
45 |
|
46 = anObject |
|
47 ^ self class = anObject class and: [ self inputValue = anObject inputValue ] |
|
48 ! |
|
49 |
|
50 hash |
|
51 ^ self inputValue hash |
46 ! ! |
52 ! ! |
47 |
53 |
48 !PPToken methodsFor:'accessing'! |
54 !PPToken methodsFor:'accessing'! |
49 |
55 |
50 collection |
56 collection |
86 ! |
92 ! |
87 |
93 |
88 value |
94 value |
89 self notify: 'Token>>#value is no longer supported. Instead use Token>>#inputValue or the more pragmatic #parsedValue.'. |
95 self notify: 'Token>>#value is no longer supported. Instead use Token>>#inputValue or the more pragmatic #parsedValue.'. |
90 ^ self inputValue |
96 ^ self inputValue |
91 ! ! |
|
92 |
|
93 !PPToken methodsFor:'comparing'! |
|
94 |
|
95 = anObject |
|
96 ^ self class = anObject class and: [ self parsedValue = anObject parsedValue ] |
|
97 ! |
|
98 |
|
99 hash |
|
100 ^ self parsedValue hash |
|
101 ! ! |
97 ! ! |
102 |
98 |
103 !PPToken methodsFor:'copying'! |
99 !PPToken methodsFor:'copying'! |
104 |
100 |
105 copyFrom: aStartInteger to: aStopInteger |
101 copyFrom: aStartInteger to: aStopInteger |