Browse Source

Merge branch 'master' of github.com:amber-smalltalk/amber

Srikumar K. S 11 years ago
parent
commit
a34f83c587
5 changed files with 27 additions and 3 deletions
  1. BIN
      images/package.png
  2. 2 2
      js/Helios-Core.js
  3. 18 0
      js/Kernel-Infrastructure.js
  4. 1 1
      st/Helios-Core.st
  5. 6 0
      st/Kernel-Infrastructure.st

BIN
images/package.png


+ 2 - 2
js/Helios-Core.js

@@ -1050,12 +1050,12 @@ return smalltalk.withContext(function($ctx1) {
 var $1;
 $1=_st(_st(self._selectedClass())._isNil())._or_((function(){
 return smalltalk.withContext(function($ctx2) {
-return _st(aString)._match_("^ [A-Z]");
+return _st(aString)._match_("^[A-Z]");
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"shouldCompileClassDefinition:",{aString:aString},smalltalk.HLToolModel)})},
 args: ["aString"],
-source: "shouldCompileClassDefinition: aString\x0a\x09^ self selectedClass isNil or: [\x0a\x09\x09aString match: '^ [A-Z]' ]",
+source: "shouldCompileClassDefinition: aString\x0a\x09^ self selectedClass isNil or: [\x0a\x09\x09aString match: '^[A-Z]' ]",
 messageSends: ["or:", "isNil", "selectedClass", "match:"],
 referencedClasses: []
 }),

+ 18 - 0
js/Kernel-Infrastructure.js

@@ -827,6 +827,24 @@ referencedClasses: []
 }),
 smalltalk.JSObjectProxy);
 
+smalltalk.addMethod(
+smalltalk.method({
+selector: "asJSON",
+category: 'enumerating',
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+var $1;
+$1=self["@jsObject"];
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"asJSON",{},smalltalk.JSObjectProxy)})},
+args: [],
+source: "asJSON\x0a\x09\x22Answers the receiver in a stringyfy-friendly fashion\x22\x0a\x0a\x09^ jsObject",
+messageSends: [],
+referencedClasses: []
+}),
+smalltalk.JSObjectProxy);
+
 smalltalk.addMethod(
 smalltalk.method({
 selector: "at:",

+ 1 - 1
st/Helios-Core.st

@@ -392,7 +392,7 @@ isToolModel
 
 shouldCompileClassDefinition: aString
 	^ self selectedClass isNil or: [
-		aString match: '^ [A-Z]' ]
+		aString match: '^[A-Z]' ]
 ! !
 
 !HLToolModel class methodsFor: 'actions'!

+ 6 - 0
st/Kernel-Infrastructure.st

@@ -338,6 +338,12 @@ value
 
 !JSObjectProxy methodsFor: 'enumerating'!
 
+asJSON
+	"Answers the receiver in a stringyfy-friendly fashion"
+
+	^ jsObject
+!
+
 keysAndValuesDo: aBlock
 	<
 		var o = self['@jsObject'];