Browse Source

feat: Adding more examples

Matthias Ladkau 3 years ago
parent
commit
3bcad5b6e1

+ 18 - 0
examples/game_of_life/.vscode/launch.json

@@ -0,0 +1,18 @@
+{
+    // Use IntelliSense to learn about possible attributes.
+    // Hover to view descriptions of existing attributes.
+    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
+    "version": "0.2.0",
+    "configurations": [
+        {
+            "type": "ecaldebug",
+            "request": "launch",
+            "name": "Debug ECAL script with ECAL Debug Server",
+            "host": "localhost",
+            "port": 33274,
+            "dir": "${workspaceFolder}",
+            "executeOnEntry": true,
+            "trace": false
+        }
+    ]
+}

+ 2 - 0
examples/game_of_life/debug.sh

@@ -0,0 +1,2 @@
+#!/bin/sh
+../../ecal debug -server game_of_life.ecal

+ 18 - 0
examples/taylor/.vscode/launch.json

@@ -0,0 +1,18 @@
+{
+    // Use IntelliSense to learn about possible attributes.
+    // Hover to view descriptions of existing attributes.
+    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
+    "version": "0.2.0",
+    "configurations": [
+        {
+            "type": "ecaldebug",
+            "request": "launch",
+            "name": "Debug ECAL script with ECAL Debug Server",
+            "host": "localhost",
+            "port": 33274,
+            "dir": "${workspaceFolder}",
+            "executeOnEntry": true,
+            "trace": false
+        }
+    ]
+}

+ 2 - 0
examples/taylor/debug.sh

@@ -0,0 +1,2 @@
+#!/bin/sh
+../../ecal debug -server main.ecal

+ 32 - 0
examples/taylor/main.ecal

@@ -0,0 +1,32 @@
+m := {
+  "xx" : 1,
+  "ll" : [1, 2, {
+    "tt" : 99
+  }]
+}
+a := 1
+
+func fa() {
+  x := 2
+  a := 3
+  fb()
+  x := 1
+}
+
+func fb() {
+  a := 4
+  fc()
+  a := 10
+}
+
+func fc() {
+  a := 5
+  log(a)
+  y := 1
+  y := 2
+  y := 3
+}
+
+a := 2
+fa()
+a := 999