-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
checking in latest versions from SS3
Name: Ston-Core-SvenVanCaekenberghe.29 Author: SvenVanCaekenberghe Time: 27 April 2012, 8:48:21 pm UUID: da09472b-ff70-46e4-9896-a661d0c3e7a0 Ancestors: Ston-Core-SvenVanCaekenberghe.28 Name: Ston-Tests-SvenVanCaekenberghe.28 Author: SvenVanCaekenberghe Time: 27 April 2012, 2:25:30 pm UUID: f1afbac1-b9b5-4042-99b6-eceb9444dd8f Ancestors: Ston-Tests-SvenVanCaekenberghe.27
- Loading branch information
0 parents
commit 87dbbe7
Showing
319 changed files
with
2,056 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
STON - Smalltalk Object Notation | ||
|
||
A lightweight text-based, human-readable data interchange format | ||
for class-based object-oriented languages like Smalltalk. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
MIT License | ||
|
||
Copyright (C) 2012 Sven Van Caekenberghe | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{ "packageExtension" : ".package" } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"noMethodMetaData" : true, | ||
"separateMethodMetaAndSource" : false, | ||
"useCypressPropertiesFile" : true } |
3 changes: 3 additions & 0 deletions
3
repository/Ston-Core.package/Boolean.extension/instance/stonOn..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
*ston-core | ||
stonOn: stonWriter | ||
stonWriter writeBoolean: self |
2 changes: 2 additions & 0 deletions
2
repository/Ston-Core.package/Boolean.extension/instance/stonProcessSubObjects..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
*ston-core | ||
stonProcessSubObjects: block |
2 changes: 2 additions & 0 deletions
2
repository/Ston-Core.package/Boolean.extension/properties.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
{ | ||
"name" : "Boolean" } |
3 changes: 3 additions & 0 deletions
3
repository/Ston-Core.package/ByteArray.extension/class/fromSton..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
*ston-core | ||
fromSton: stonReader | ||
^ self readHexFrom: stonReader parseListSingleton |
5 changes: 5 additions & 0 deletions
5
repository/Ston-Core.package/ByteArray.extension/instance/stonOn..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
*ston-core | ||
stonOn: stonWriter | ||
"Use a hex representation" | ||
|
||
stonWriter writeObject: self listSingleton: self hex |
2 changes: 2 additions & 0 deletions
2
repository/Ston-Core.package/ByteArray.extension/instance/stonProcessSubObjects..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
*ston-core | ||
stonProcessSubObjects: block |
2 changes: 2 additions & 0 deletions
2
repository/Ston-Core.package/ByteArray.extension/properties.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
{ | ||
"name" : "ByteArray" } |
3 changes: 3 additions & 0 deletions
3
repository/Ston-Core.package/Character.extension/class/fromSton..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
*ston-core | ||
fromSton: stonReader | ||
^ stonReader parseListSingleton first |
3 changes: 3 additions & 0 deletions
3
repository/Ston-Core.package/Character.extension/instance/stonOn..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
*ston-core | ||
stonOn: stonWriter | ||
stonWriter writeObject: self listSingleton: self asString |
2 changes: 2 additions & 0 deletions
2
repository/Ston-Core.package/Character.extension/properties.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
{ | ||
"name" : "Character" } |
5 changes: 5 additions & 0 deletions
5
repository/Ston-Core.package/Class.extension/instance/stonName.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
*ston-core | ||
stonName | ||
"Override to encode my instances using a different class name." | ||
|
||
^ self name |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
{ | ||
"name" : "Class" } |
7 changes: 7 additions & 0 deletions
7
repository/Ston-Core.package/Collection.extension/class/fromSton..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
*ston-core | ||
fromSton: stonReader | ||
| collection | | ||
collection := self new. | ||
stonReader parseListDo: [ :each | | ||
collection add: each ]. | ||
^ collection |
4 changes: 4 additions & 0 deletions
4
repository/Ston-Core.package/Collection.extension/instance/stonOn..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
*ston-core | ||
stonOn: stonWriter | ||
stonWriter writeObject: self do: [ | ||
stonWriter encodeList: self ] |
2 changes: 2 additions & 0 deletions
2
repository/Ston-Core.package/Collection.extension/properties.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
{ | ||
"name" : "Collection" } |
3 changes: 3 additions & 0 deletions
3
repository/Ston-Core.package/Date.extension/class/fromSton..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
*ston-core | ||
fromSton: stonReader | ||
^ self readFrom: stonReader parseListSingleton readStream |
5 changes: 5 additions & 0 deletions
5
repository/Ston-Core.package/Date.extension/instance/stonOn..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
*ston-core | ||
stonOn: stonWriter | ||
"Use an ISO style YYYYMMDD representation" | ||
|
||
stonWriter writeObject: self listSingleton: self yyyymmdd |
2 changes: 2 additions & 0 deletions
2
repository/Ston-Core.package/Date.extension/instance/stonProcessSubObjects..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
*ston-core | ||
stonProcessSubObjects: block |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
{ | ||
"name" : "Date" } |
3 changes: 3 additions & 0 deletions
3
repository/Ston-Core.package/DateAndTime.extension/class/fromSton..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
*ston-core | ||
fromSton: stonReader | ||
^ DateAndTime readFrom: stonReader parseListSingleton readStream |
7 changes: 7 additions & 0 deletions
7
repository/Ston-Core.package/DateAndTime.extension/instance/stonOn..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
*ston-core | ||
stonOn: stonWriter | ||
"Use an ISO representation with all details" | ||
|
||
stonWriter writeObject: self listSingleton: | ||
(String streamContents: [ :stream | | ||
self printOn: stream withLeadingSpace: false ]) |
2 changes: 2 additions & 0 deletions
2
repository/Ston-Core.package/DateAndTime.extension/instance/stonProcessSubObjects..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
*ston-core | ||
stonProcessSubObjects: block |
2 changes: 2 additions & 0 deletions
2
repository/Ston-Core.package/DateAndTime.extension/properties.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
{ | ||
"name" : "DateAndTime" } |
10 changes: 10 additions & 0 deletions
10
repository/Ston-Core.package/Dictionary.extension/class/fromSton..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
*ston-core | ||
fromSton: stonReader | ||
"Instances of STON mapClass will be read directly and won't arrive here. | ||
Other (sub)classes will use this method." | ||
|
||
| dictionary | | ||
dictionary := self new. | ||
stonReader parseMapDo: [ :key :value | | ||
dictionary at: key put: value ]. | ||
^ dictionary |
12 changes: 12 additions & 0 deletions
12
repository/Ston-Core.package/Dictionary.extension/instance/stonOn..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
*ston-core | ||
stonOn: stonWriter | ||
"Instances of STON mapClass will be encoded directly, without a class tag. | ||
Other (sub)classes will be encoded with a class tag and will use a map representation. " | ||
|
||
self class == STON mapClass | ||
ifTrue: [ | ||
stonWriter writeMap: self ] | ||
ifFalse: [ | ||
stonWriter | ||
writeObject: self | ||
do: [ stonWriter encodeMap: self ] ] |
2 changes: 2 additions & 0 deletions
2
repository/Ston-Core.package/Dictionary.extension/properties.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
{ | ||
"name" : "Dictionary" } |
3 changes: 3 additions & 0 deletions
3
repository/Ston-Core.package/Integer.extension/instance/stonOn..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
*ston-core | ||
stonOn: stonWriter | ||
stonWriter writeInteger: self |
2 changes: 2 additions & 0 deletions
2
repository/Ston-Core.package/Integer.extension/properties.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
{ | ||
"name" : "Integer" } |
3 changes: 3 additions & 0 deletions
3
repository/Ston-Core.package/Number.extension/instance/stonOn..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
*ston-core | ||
stonOn: stonWriter | ||
stonWriter writeFloat: self asFloat |
2 changes: 2 additions & 0 deletions
2
repository/Ston-Core.package/Number.extension/instance/stonProcessSubObjects..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
*ston-core | ||
stonProcessSubObjects: block |
2 changes: 2 additions & 0 deletions
2
repository/Ston-Core.package/Number.extension/properties.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
{ | ||
"name" : "Number" } |
8 changes: 8 additions & 0 deletions
8
repository/Ston-Core.package/Object.extension/class/fromSton..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
*ston-core | ||
fromSton: stonReader | ||
"Create a new instance and delegate decoding to instance side. | ||
Override only when new instance should be created directly (see implementors). " | ||
|
||
^ self new | ||
fromSton: stonReader; | ||
yourself |
11 changes: 11 additions & 0 deletions
11
repository/Ston-Core.package/Object.extension/instance/fromSton..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
*ston-core | ||
fromSton: stonReader | ||
"Decode non-variable classes from a map of their instance variables and values. | ||
Override to customize and add a mathcing #toSton: (see implementors)." | ||
|
||
self class isVariable | ||
ifTrue: [ | ||
self subclassResponsibility ] | ||
ifFalse: [ | ||
stonReader parseMapDo: [ :instVarName :value | | ||
self instVarNamed: instVarName put: value ] ] |
3 changes: 3 additions & 0 deletions
3
repository/Ston-Core.package/Object.extension/instance/isStonReference.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
*ston-core | ||
isStonReference | ||
^ false |
12 changes: 12 additions & 0 deletions
12
repository/Ston-Core.package/Object.extension/instance/stonOn..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
*ston-core | ||
stonOn: stonWriter | ||
"Encode non-variable classes with a map of their instance variable and values. | ||
Override to customize and add a matching #fromSton: (see implementors)." | ||
|
||
self class isVariable | ||
ifTrue: [ | ||
self subclassResponsibility ] | ||
ifFalse: [ | ||
stonWriter writeObject: self streamMap: [ :dictionary | | ||
self class allInstVarNames do: [ :each | | ||
dictionary at: each asSymbol put: (self instVarNamed: each) ] ] ] |
8 changes: 8 additions & 0 deletions
8
repository/Ston-Core.package/Object.extension/instance/stonProcessSubObjects..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
*ston-core | ||
stonProcessSubObjects: block | ||
1 to: self class instSize do: [ :each | | ||
self instVarAt: each put: (block value: (self instVarAt: each)) ]. | ||
(self class isVariable and: [ self class isBytes not ]) | ||
ifTrue: [ | ||
1 to: self basicSize do: [ :each | | ||
self basicAt: each put: (block value: (self basicAt: each)) ] ] |
2 changes: 2 additions & 0 deletions
2
repository/Ston-Core.package/Object.extension/properties.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
{ | ||
"name" : "Object" } |
5 changes: 5 additions & 0 deletions
5
repository/Ston-Core.package/Point.extension/instance/fromSton..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
*ston-core | ||
fromSton: stonReader | ||
stonReader parseListDo: [ :each :index | | ||
index = 1 ifTrue: [ x := each ]. | ||
index = 2 ifTrue: [ y := each ] ] |
4 changes: 4 additions & 0 deletions
4
repository/Ston-Core.package/Point.extension/instance/stonOn..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
*ston-core | ||
stonOn: stonWriter | ||
stonWriter writeObject: self streamShortList: [ :array | | ||
array add: x; add: y ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
{ | ||
"name" : "Point" } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
STON implements serialization and materialization using the Smalltalk Object Notation format. | ||
|
||
S y n t a x | ||
|
||
value | ||
primitive-value | ||
object-value | ||
reference | ||
nil | ||
primitive-value | ||
number | ||
true | ||
false | ||
symbol | ||
string | ||
object-value | ||
object | ||
map | ||
list | ||
object | ||
classname map | ||
classname list | ||
reference | ||
@ int-index-previous-object-value | ||
map | ||
{} | ||
{ members } | ||
members | ||
pair | ||
pair , members | ||
pair | ||
string : value | ||
symbol : value | ||
number : value | ||
list | ||
[] | ||
[ elements ] | ||
elements | ||
value | ||
value , elements | ||
string | ||
'' | ||
' chars ' | ||
chars | ||
char | ||
char chars | ||
char | ||
any-printable-ASCII-character- | ||
except-'-"-or-\ | ||
\' | ||
\" | ||
\\ | ||
\/ | ||
\b | ||
\f | ||
\n | ||
\r | ||
\t | ||
\u four-hex-digits | ||
symbol | ||
# chars-limited | ||
# ' chars ' | ||
chars-limited | ||
char-limited | ||
char-limited chars-limited | ||
char-limited | ||
a-z A-Z 0-9 - _ . / | ||
classname | ||
uppercase-alpha-char alphanumeric-char | ||
number | ||
int | ||
int frac | ||
int exp | ||
int frac exp | ||
int | ||
digit | ||
digit1-9 digits | ||
- digit | ||
- digit1-9 digits | ||
frac | ||
. digits | ||
exp | ||
e digits | ||
digits | ||
digit | ||
digit digits | ||
e | ||
e | ||
e+ | ||
e- | ||
E | ||
E+ | ||
E- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
convencience | ||
fromStream: readStream | ||
^ (self reader on: readStream) next |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
convencience | ||
fromString: string | ||
^ self fromStream: string readStream |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
accessing | ||
listClass | ||
^ Array |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
accessing | ||
mapClass | ||
^ Dictionary |
3 changes: 3 additions & 0 deletions
3
repository/Ston-Core.package/STON.class/class/put.onStream..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
convencience | ||
put: object onStream: stream | ||
(self writer on: stream) nextPut: object |
5 changes: 5 additions & 0 deletions
5
repository/Ston-Core.package/STON.class/class/put.onStreamPretty..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
convencience | ||
put: object onStreamPretty: stream | ||
(self writer on: stream) | ||
prettyPrint: true; | ||
nextPut: object |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
accessing | ||
reader | ||
^ STONReader new |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
convencience | ||
toString: object | ||
^ String streamContents: [ :stream | | ||
self put: object onStream: stream ] |
4 changes: 4 additions & 0 deletions
4
repository/Ston-Core.package/STON.class/class/toStringPretty..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
convencience | ||
toStringPretty: object | ||
^ String streamContents: [ :stream | | ||
self put: object onStreamPretty: stream ] |
Oops, something went wrong.