The Trunk: ShoutCore-nice.5.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-nice.5.mcz

commits-2
Nicolas Cellier uploaded a new version of ShoutCore to project The Trunk:
http://source.squeak.org/trunk/ShoutCore-nice.5.mcz

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

Name: ShoutCore-nice.5
Author: nice
Time: 30 November 2009, 11:42:19 am
UUID: 21b868bc-bc05-8b4f-b0d5-6571aa05242e
Ancestors: ShoutCore-rss.4

Make Shout literal ByteArray aware #[1 2 3]

=============== Diff against ShoutCore-rss.4 ===============

Item was added:
+ ----- Method: SHParserST80>>parseByteArray (in category 'parse') -----
+ parseByteArray
+ [currentTokenFirst == $]] whileFalse: [
+ currentTokenFirst isDigit
+ ifTrue: [
+ "do not parse the number, can be time consuming"
+ self scanPast: #number]
+ ifFalse: [
+ self failWhen: currentTokenFirst == $. .
+ self error]].
+ self scanPast: #arrayEnd!

Item was changed:
  ----- Method: SHParserST80>>parseSymbol (in category 'parse') -----
  parseSymbol
  | c |
  currentToken = '#'
  ifTrue: [
  "if token is just the #, then scan whitespace and comments
  and then process the next character.
  Squeak allows space between the # and the start of the symbol
  e.g. # (),  #  a, #  'sym' "
  self rangeType: #symbol.
  self scanWhitespace].
  c := self currentChar.
  self failWhen: (c isNil or: [c isSeparator]).
  c == $(
  ifTrue: [
  self nextChar.
  self scanPast: #arrayStart start: currentTokenSourcePosition end: currentTokenSourcePosition + 1.
  ^self parseArray].
  c == $' ifTrue: [^self parseSymbolString].
+ c == $[ ifTrue: [
+ self nextChar.
+ self scanPast: #arrayStart start: currentTokenSourcePosition end: currentTokenSourcePosition + 1.
+ ^self parseByteArray].
  ((self isSelectorCharacter: c) or: [c == $-])
  ifTrue: [^self parseSymbolSelector].
  (c isLetter or: [c == $:]) ifTrue: [^self parseSymbolIdentifier].
  ^self parseCharSymbol!