Skip to content

Commit

Permalink
Issue #465: fix regression in testMethod ... 11 run, 10 passed, 1 fai…
Browse files Browse the repository at this point in the history
…lures, 0 errors
  • Loading branch information
dalehenrich committed Jul 24, 2019
1 parent 289a0b6 commit c183765
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 29 deletions.
8 changes: 4 additions & 4 deletions rowan/configs/Load.ston
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ RwProjectLoadConfiguration {
#conditionalPackageMapSpecs : {
'gemstone' : {
'allusers' : {
#defaultUseSessionMethodsForExtensions : false,
#defaultSymbolDictName : 'UserGlobals'
#defaultSymbolDictName : 'UserGlobals',
#defaultUseSessionMethodsForExtensions : false
},
'SystemUser' : {
#defaultUseSessionMethodsForExtensions : false,
#defaultSymbolDictName : 'RowanKernel'
#defaultSymbolDictName : 'RowanKernel',
#defaultUseSessionMethodsForExtensions : false
}
}
},
Expand Down
20 changes: 1 addition & 19 deletions rowan/src/AST-Core/RBParser.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -720,24 +720,6 @@ RBParser >> parseStatements: pragmaBoolean [
rightBar: rightBar)
]

{ #category : 'private-parsing' }
RBParser >> parseTonelKeywordPattern [
| keywords args node |
keywords := OrderedCollection new.
args := OrderedCollection new.
[currentToken isKeyword]
whileTrue:
[keywords add: currentToken.
self step.
args add: self parseVariableNode].
node := self methodNodeClass
selectorParts: keywords
arguments: args.
node comments: (node comments, args last comments).
args last comments: nil.
^node
]

{ #category : 'private-parsing' }
RBParser >> parseTonelMessagePattern [

Expand All @@ -746,7 +728,7 @@ RBParser >> parseTonelMessagePattern [
ifTrue: [self parseTonelUnaryPattern]
ifFalse:
[currentToken isKeyword
ifTrue: [self parseTonelKeywordPattern]
ifTrue: [self parseKeywordPattern]
ifFalse: [self parseTonelBinaryPattern]]
]

Expand Down
6 changes: 1 addition & 5 deletions rowan/src/Rowan-Components/NewTonelParser.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@ Class {
{ #category : 'parsing' }
NewTonelParser >> method [

"this is what we're looking for:
self copyFrom: 37 to: 41
'name '
"
| type start end currentPosition selector count xStart |

type := self untilIncluding: '>>'.
Expand All @@ -29,7 +25,7 @@ end := methodParser scanner stream position.
start := methodBodyStart := methodParser scanner previousStepPosition - 3.
currentPosition := methodParser scanner stream position.
methodParser scanner stream position: xStart.
count := end - start.
count := end - xStart + 1.
selector := String new: count.
methodParser scanner stream readInto: selector startingAt: 1 count: count.
methodParser scanner stream position: currentPosition.
Expand Down
2 changes: 1 addition & 1 deletion rowan/src/Rowan-Tests/NewTonelParserTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ NewTonelParserTest >> testMetadata [

{ #category : 'tests' }
NewTonelParserTest >> testMethod [

self
assertParse: 'Object>>name'
rule: #method
Expand All @@ -131,7 +132,6 @@ false ifTrue: [ "I'm not sure that this pattern will show up in the wild ...so i
rule: #method
equals: #(('Object' nil) 'name: aString').
].

self
assertParse: 'Object class >> name: aString'
rule: #method
Expand Down

0 comments on commit c183765

Please sign in to comment.