[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-smalltalk] Fixing the compiler (http://smalltalk.gnu.org/proje
From: |
Paolo Bonzini |
Subject: |
Re: [Help-smalltalk] Fixing the compiler (http://smalltalk.gnu.org/project/issue/527) |
Date: |
Mon, 13 Dec 2010 10:40:37 +0100 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.12) Gecko/20101103 Fedora/1.0-0.33.b2pre.fc14 Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.6 |
On 12/11/2010 05:29 PM, Gwenaël Casaccio wrote:
> evalString: aString to: anObject ifError: aBlock [
> <category: 'compiling'>
> ^STInST.STEvaluationDriver new
> - parseSmalltalk: aString
> + parseSmalltalk: '^ [', aString, ' ] value'
> with: self evaluatorClass
> onError:
> [:m :l |
Here is the correct fix, but the above code definitely set me on the right
track, so thanks!
diff --git a/packages/stinst/parser/STFileParser.st
b/packages/stinst/parser/STFileParser.st
index 205a595..cdc4914 100644
--- a/packages/stinst/parser/STFileParser.st
+++ b/packages/stinst/parser/STFileParser.st
@@ -128,4 +128,5 @@ RBParser subclass: STFileParser [
tags := nil.
node := self parseStatements.
+ node addReturn.
node comments isNil
ifTrue: [node comments: comments]
Paolo