Skip to content

Commit

Permalink
Issue #4: successfully execute execute: 'todeIt.solo "eval 3+4" -D'…
Browse files Browse the repository at this point in the history
… ... returning a Text object
  • Loading branch information
dalehenrich committed Jul 28, 2023
1 parent 1280518 commit 1ae32dd
Show file tree
Hide file tree
Showing 19 changed files with 62 additions and 6 deletions.
2 changes: 1 addition & 1 deletion rowan/components/GLASS.ston
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ RwSimpleProjectLoadComponentV2 {
'GsDevKit_stones-GLASS'
],
#comment : 'GLASS classes needed to support the Text, since Text is (currently) passed back as a result when a remote tODE command is executed ... a feature we want (remote tODE commands)'
}
}
4 changes: 2 additions & 2 deletions rowan/components/Tode.ston
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ RwSimpleProjectLoadComponentV2 {
#name : 'Tode',
#condition : 'common',
#projectNames : [ ],
#componentNames : [
#componentNames : [
'GLASS'
],
#packageNames : [
'GsDevKit_stones-Tode'
],
#comment : 'Shared classes between GsDevKit_stones and Tode'
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
*gsdevkit_stones-glass
capitalized
"Return a copy with the first letter capitalized"
| cap |
self size == 0 ifTrue: [ ^ self copy ].
cap := self copy.
cap at: 1 put: (cap at: 1) asUppercase.
^ cap
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
{
"name" : "CharacterCollection" }
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ named: newName put: aColor
accessor _ str, (String with: Character cr with: Character tab), '^', cap.
self class compile: accessor
classified: 'named colors'].
(self classPool includesKey: csym) ifFalse: [
(self _classVars includesKey: csym) ifFalse: [
self addClassVarName: cap].
(ColorNames includes: sym) ifFalse: [
ColorNames add: sym].
^ self classPool at: csym put: aColor
^ self _classVars at: csym put: aColor
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*gsdevkit_stones-glass
min: aMin max: aMax
^ (self min: aMin) max: aMax
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
{
"name" : "Magnitude" }
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
*gsdevkit_stones-glass
instVarNamed: aString put: aValue
"Store into the value of the instance variable in me of that name. Slow and unclean, but very useful. "

^ self
instVarAt: (self class allInstVarNames indexOfIdentical: aString asSymbol)
put: aValue
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
{
"name" : "Object" }
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
instance creation
fromSton: stonReader
^ self new
fromSton: stonReader;
yourself
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
printing
fromSton: stonReader
stonReader
parseMapDo: [ :instVarName :value | self instVarNamed: instVarName put: value ]
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
printing
stonOn: stonWriter
stonWriter writeObject: self
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*gsdevkit_stones-glass
capitalized
^ self asString capitalized asSymbol
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
{
"name" : "Symbol" }
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
ston
fromSton: stonReader
^ self new
fromSton: stonReader;
yourself
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
ston
fromSton: stonReader
stonReader
parseMapDo: [ :instVarName :value | self instVarNamed: instVarName put: value ]
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
ston
stonOn: stonWriter
stonWriter writeObject: self
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
session management
logout
self session logout.
^ nil
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,5 @@ evaluateCommand: command batchMode: aBool
ifTrue: [ ^ '' ].
(self builtInCommands includes: command command)
ifTrue: [ ^ self executeBuiltIn: command ].
self halt.
^ (self topezClient evaluateCommand: command batchMode: aBool)
convertTDEvaluateTokenResponseToText: self objectSerializer

0 comments on commit 1ae32dd

Please sign in to comment.