The Trunk: ShoutCore-eem.43.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: ShoutCore-eem.43.mcz

commits-2
Eliot Miranda uploaded a new version of ShoutCore to project The Trunk:
http://source.squeak.org/trunk/ShoutCore-eem.43.mcz

==================== Summary ====================

Name: ShoutCore-eem.43
Author: eem
Time: 3 February 2015, 11:38:17.924 am
UUID: c34f1798-fdff-4e96-b35a-9c7b1b207289
Ancestors: ShoutCore-ul.42

Port Pharo fixes for parsing " :arg || temps | " in blocks
and scaled decimals.

=============== Diff against ShoutCore-ul.42 ===============

Item was added:
+ ----- Method: SHParserST80>>parsingBlockArguments (in category 'token testing') -----
+ parsingBlockArguments
+ ^ranges notEmpty and: [ranges last type = #blockPatternArg]!

Item was changed:
  ----- Method: SHParserST80>>scanBinary (in category 'scan') -----
  scanBinary
  | c d |
  c := self currentChar.
  currentTokenSourcePosition := sourcePosition.
  currentToken := c asString.
  d := self nextChar.
  ((self isSelectorCharacter: c) or: [c == $:]) ifFalse: [^currentToken].
+ (c == $: and: [d == $=]) ifTrue: " := assignment"
+ [currentToken := currentToken , d asString.
+ self nextChar.
+ ^currentToken].
+ ((c == $|) and: [self parsingBlockArguments]) ifTrue:
+ [^currentToken].
+ [self isSelectorCharacter: d] whileTrue:
+ [currentToken := currentToken , d asString.
+ d := self nextChar].
- (c == $: and: [d == $=])
- ifTrue: [" := assignment"
- currentToken := currentToken , d asString.
- self nextChar.
- ^currentToken].
- [self isSelectorCharacter: d]
- whileTrue: [
- currentToken := currentToken , d asString.
- d := self nextChar].
  ^currentToken!

Item was changed:
  ----- Method: SHParserST80>>scanNumber (in category 'scan') -----
  scanNumber
  | start c nc base |
  start := sourcePosition.
  self skipDigits.
  c := self currentChar.
  c == $r
  ifTrue: [
  base := Integer readFrom: (ReadStream on: (source copyFrom: start to: sourcePosition - 1)).
  self peekChar == $- ifTrue:[self nextChar].
  self skipBigDigits: base.
  c := self currentChar.
  c == $.
  ifTrue: [
  (self isBigDigit: self nextChar base: base)
  ifFalse: [sourcePosition := sourcePosition - 1]
  ifTrue: [self skipBigDigits: base]].
  c := self currentChar.
  ('deq'includes: c)
  ifTrue: [
  ((encodedCharSet isDigit: (nc := self nextChar)) or: [nc == $- and:[(encodedCharSet isDigit: self peekChar)]])
  ifFalse: [sourcePosition := sourcePosition - 1]
  ifTrue: [self skipDigits]].
  c == $s
  ifTrue: [
+ (encodedCharSet isDigit: (nc := self nextChar))
+ ifFalse: [nc isLetter ifTrue: [sourcePosition := sourcePosition - 1]]
- (encodedCharSet isDigit: self nextChar)
- ifFalse: [sourcePosition := sourcePosition - 1]
  ifTrue: [self skipDigits]].
  currentToken := source copyFrom: start to: sourcePosition - 1.
  ^currentTokenSourcePosition := start].
  c == $s
  ifTrue: [
+ (encodedCharSet isDigit: (nc := self nextChar))
+ ifFalse: [nc isLetter ifTrue: [sourcePosition := sourcePosition - 1]]
- (encodedCharSet isDigit: self nextChar)
- ifFalse: [sourcePosition := sourcePosition - 1]
  ifTrue: [self skipDigits.].
  currentToken := source copyFrom: start to: sourcePosition - 1.
  ^currentTokenSourcePosition := start].
  c == $.
  ifTrue: [
  (encodedCharSet isDigit: self nextChar)
  ifFalse: [
  sourcePosition := sourcePosition - 1.
  currentToken := source copyFrom: start to: sourcePosition - 1.
  ^currentTokenSourcePosition := start]
  ifTrue: [self skipDigits]].
  c := self currentChar.
  ('deq' includes: c)
  ifTrue: [
  ((encodedCharSet isDigit: (nc := self nextChar)) or: [nc == $-  and:[(encodedCharSet isDigit: self peekChar)]])
  ifFalse: [sourcePosition := sourcePosition - 1]
  ifTrue: [self skipDigits]].
  c == $s
  ifTrue: [
+ (encodedCharSet isDigit: (nc := self nextChar))
+ ifFalse: [nc isLetter ifTrue: [sourcePosition := sourcePosition - 1]]
- (encodedCharSet isDigit: self nextChar)
- ifFalse: [sourcePosition := sourcePosition - 1]
  ifTrue: [self skipDigits]].
  currentToken := source copyFrom: start to: sourcePosition - 1.
  ^currentTokenSourcePosition := start!