Split columns
authorAlyssa Rosenzweig <alyssa@backtick.town>
Wed, 22 Jun 2016 18:38:02 +0000 (11:38 -0700)
committerAlyssa Rosenzweig <alyssa@backtick.town>
Wed, 22 Jun 2016 18:38:02 +0000 (11:38 -0700)
src/CPU/parse-reference.js

index 77a9314..a894675 100644 (file)
@@ -41,9 +41,21 @@ function parseInstruction(instruction) {
         return el.indexOf("---------") > -1;
     });
 
+    var forms = instruction.slice(nums + 1, -2).map(function(form) {
+        return [
+                form.slice(6-1, 20-1),
+                form.slice(20-1, 34-1),
+                form.slice(34-1, 40-1),
+                form.slice(40-1, 46-1),
+                form.slice(46-1)
+            ].map(function(x) { return x.trim(); });
+    });
+
+    console.log(forms);
+
     return {
         "name": name,
-        "forms": instruction.slice(nums + 1, -2)
+        "forms": forms
     };
 }
 
This page took 0.049669 seconds and 4 git commands to generate.