Browse Source

Renamed to STRuctured Object Maker

Also, 'strom' means 'tree' in many Slavic languages.
Herbert Vojčík 7 years ago
parent
commit
214cd2968f
6 changed files with 29 additions and 29 deletions
  1. 1 1
      Gruntfile.js
  2. 15 15
      src/Compiler-Strom.js
  3. 6 6
      src/Compiler-Strom.st
  4. 1 1
      support/lang.js
  5. 3 3
      support/parser.js
  6. 3 3
      support/parser.pegjs

+ 1 - 1
Gruntfile.js

@@ -48,7 +48,7 @@ module.exports = function (grunt) {
                     'src/Kernel-Infrastructure.st', 'src/Kernel-Promises.st', 'src/Kernel-Exceptions.st', 'src/Kernel-Announcements.st',
                     'src/Platform-Services.st', 'src/Platform-ImportExport.st', 'src/Platform-Browser.st', 'src/Platform-Node.st',
                     'src/Platform-DOM.st',
-                    'src/Kernel-Dag.st', 'src/Compiler-Core.st', 'src/Compiler-AST.st', 'src/Compiler-STX.st',
+                    'src/Kernel-Dag.st', 'src/Compiler-Core.st', 'src/Compiler-AST.st', 'src/Compiler-Strom.st',
                     'src/Compiler-IR.st', 'src/Compiler-Inlining.st', 'src/Compiler-Semantic.st', 'src/Compiler-Interpreter.st',
                     'src/SUnit.st',
                     'src/Kernel-Tests.st', 'src/Compiler-Tests.st', 'src/Platform-DOM-Tests.st', 'src/SUnit-Tests.st'

+ 15 - 15
src/Compiler-STX.js → src/Compiler-Strom.js

@@ -2,13 +2,13 @@ define(["amber/boot", "amber_core/Compiler-AST"], function($boot){"use strict";
 if(!$boot.nilAsReceiver)$boot.nilAsReceiver=$boot.nil;
 var $core=$boot.api,nil=$boot.nilAsReceiver,$recv=$boot.asReceiver,$globals=$boot.globals;
 if(!$boot.nilAsClass)$boot.nilAsClass=$boot.dnu;
-$core.addPackage("Compiler-STX");
-$core.packages["Compiler-STX"].innerEval = function (expr) { return eval(expr); };
-$core.packages["Compiler-STX"].transport = {"type":"amd","amdNamespace":"amber_core"};
+$core.addPackage("Compiler-Strom");
+$core.packages["Compiler-Strom"].innerEval = function (expr) { return eval(expr); };
+$core.packages["Compiler-Strom"].transport = {"type":"amd","amdNamespace":"amber_core"};
 
-$core.addClass("StxNode", $globals.ASTNode, ["tag", "attributes", "children"], "Compiler-STX");
+$core.addClass("StromNode", $globals.ASTNode, ["tag", "attributes", "children"], "Compiler-Strom");
 //>>excludeStart("ide", pragmas.excludeIdeData);
-$globals.StxNode.comment="I represent an assignment node.";
+$globals.StromNode.comment="I represent an assignment node.";
 //>>excludeEnd("ide");
 $core.addMethod(
 $core.method({
@@ -21,7 +21,7 @@ return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
 return $recv(aVisitor)._visitDagNode_(self);
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"acceptDagVisitor:",{aVisitor:aVisitor},$globals.StxNode)});
+}, function($ctx1) {$ctx1.fill(self,"acceptDagVisitor:",{aVisitor:aVisitor},$globals.StromNode)});
 //>>excludeEnd("ctx");
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
@@ -31,7 +31,7 @@ referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: ["visitDagNode:"]
 }),
-$globals.StxNode);
+$globals.StromNode);
 
 $core.addMethod(
 $core.method({
@@ -49,7 +49,7 @@ referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
 }),
-$globals.StxNode);
+$globals.StromNode);
 
 $core.addMethod(
 $core.method({
@@ -68,7 +68,7 @@ referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
 }),
-$globals.StxNode);
+$globals.StromNode);
 
 $core.addMethod(
 $core.method({
@@ -86,7 +86,7 @@ referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
 }),
-$globals.StxNode);
+$globals.StromNode);
 
 $core.addMethod(
 $core.method({
@@ -105,7 +105,7 @@ referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
 }),
-$globals.StxNode);
+$globals.StromNode);
 
 $core.addMethod(
 $core.method({
@@ -125,7 +125,7 @@ $ctx1.sendIdx["addAll:"]=1;
 $recv($1)._addAll_($self._children());
 return $recv($1)._yourself();
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"dagChildren",{},$globals.StxNode)});
+}, function($ctx1) {$ctx1.fill(self,"dagChildren",{},$globals.StromNode)});
 //>>excludeEnd("ctx");
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
@@ -135,7 +135,7 @@ referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: ["addAll:", "tag", "attributes", "children", "yourself"]
 }),
-$globals.StxNode);
+$globals.StromNode);
 
 $core.addMethod(
 $core.method({
@@ -153,7 +153,7 @@ referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
 }),
-$globals.StxNode);
+$globals.StromNode);
 
 $core.addMethod(
 $core.method({
@@ -172,7 +172,7 @@ referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
 }),
-$globals.StxNode);
+$globals.StromNode);
 
 
 });

+ 6 - 6
src/Compiler-STX.st → src/Compiler-Strom.st

@@ -1,11 +1,11 @@
-Smalltalk createPackage: 'Compiler-STX'!
-ASTNode subclass: #StxNode
+Smalltalk createPackage: 'Compiler-Strom'!
+ASTNode subclass: #StromNode
 	instanceVariableNames: 'tag attributes children'
-	package: 'Compiler-STX'!
-!StxNode commentStamp!
+	package: 'Compiler-Strom'!
+!StromNode commentStamp!
 I represent an assignment node.!
 
-!StxNode methodsFor: 'accessing'!
+!StromNode methodsFor: 'accessing'!
 
 attributes
 	^ attributes
@@ -38,7 +38,7 @@ tag: anObject
 	tag := anObject
 ! !
 
-!StxNode methodsFor: 'visiting'!
+!StromNode methodsFor: 'visiting'!
 
 acceptDagVisitor: aVisitor
 	^ aVisitor visitDagNode: self

+ 1 - 1
support/lang.js

@@ -8,7 +8,7 @@ define([
     'amber_core/Platform-ImportExport',
     'amber_core/Compiler-Core',
     'amber_core/Compiler-AST',
-    'amber_core/Compiler-STX',
+    'amber_core/Compiler-Strom',
     'amber_core/Compiler-Semantic',
     'amber_core/Compiler-IR',
     'amber_core/Compiler-Inlining',

+ 3 - 3
support/parser.js

@@ -279,7 +279,7 @@ $globals.SmalltalkParser = (function() {
         peg$c120 = ">",
         peg$c121 = { type: "literal", value: ">", description: "\">\"" },
         peg$c122 = function(tag, attributes, children) {
-        		return $globals.StxNode._new()
+        		return $globals.StromNode._new()
         			._location_(location())
         			._source_(text())
         			._tag_(tag)
@@ -2025,7 +2025,7 @@ $globals.SmalltalkParser = (function() {
         if (s0 === peg$FAILED) {
           s0 = peg$parseblock();
           if (s0 === peg$FAILED) {
-            s0 = peg$parsestx();
+            s0 = peg$parsestrom();
           }
         }
       }
@@ -3636,7 +3636,7 @@ $globals.SmalltalkParser = (function() {
       return s0;
     }
 
-    function peg$parsestx() {
+    function peg$parsestrom() {
       var s0, s1, s2, s3, s4, s5, s6, s7, s8;
 
       var key    = peg$currPos * 66 + 58,

+ 3 - 3
support/parser.pegjs

@@ -107,7 +107,7 @@ pseudoVariable = val:(
 parseTimeLiteral =
 	pseudoVariable / number / literalArray / string / symbol / character
 
-runtimeLiteral = dynamicDictionary / dynamicArray / block / stx
+runtimeLiteral = dynamicDictionary / dynamicArray / block / strom
 
 literal = runtimeLiteral / parseTimeLiteral
 
@@ -278,12 +278,12 @@ wsValueAttrDef = ws selector:unarySelector ws '=' value:wsOperand {
 
 wsAttrDef = wsValueAttrDef / wsDefaultAttrDef
 
-stx =
+strom =
 	'<'
 	tag:wsOperand attributes:wsAttrDef*
 	children:(ws '|' operands:wsOperand* {return operands;})?
 	ws '>' {
-		return $globals.StxNode._new()
+		return $globals.StromNode._new()
 			._location_(location())
 			._source_(text())
 			._tag_(tag)