Skip to content

Commit

Permalink
Merge pull request #415 from Eclalang/issue-#414-run-ecla-mainthread
Browse files Browse the repository at this point in the history
added the call to mainthread in the main function
  • Loading branch information
mkarten authored Jul 9, 2024
2 parents 5980996 + 5099540 commit e4455f6
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 46 deletions.
6 changes: 5 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ module github.com/Eclalang/Ecla

go 1.21.1

require github.com/Eclalang/LibraryController v1.0.0
require (
github.com/Eclalang/LibraryController v1.0.0
github.com/Eclalang/mainthread v0.0.0-20171120011319-8b78f0a41ae3
)

require (
github.com/Eclalang/cast v1.0.0 // indirect
Expand All @@ -15,4 +18,5 @@ require (
github.com/Eclalang/regex v1.0.1 // indirect
github.com/Eclalang/strings v1.0.0 // indirect
github.com/Eclalang/time v1.0.1 // indirect
github.com/faiface/mainthread v0.0.0-20171120011319-8b78f0a41ae3 // indirect
)
46 changes: 4 additions & 42 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,64 +1,26 @@
github.com/Eclalang/LibraryController v0.0.0-20240207163638-1857ea2c8744 h1:DkaODHuKQLWK50fFx9QvSwiKYvfl+ymFWF1aJye+4Sk=
github.com/Eclalang/LibraryController v0.0.0-20240207163638-1857ea2c8744/go.mod h1:nc8mdoUKsBOon3oN58qQZQaZaRAUJHuxVE79+3kd/PA=
github.com/Eclalang/LibraryController v0.0.0-20240220200012-5f405b0f3889 h1:iuo1KGp4gHkC0X351DFlF0IvxckrLgI9A11TUjEBpHY=
github.com/Eclalang/LibraryController v0.0.0-20240220200012-5f405b0f3889/go.mod h1:nc8mdoUKsBOon3oN58qQZQaZaRAUJHuxVE79+3kd/PA=
github.com/Eclalang/LibraryController v0.0.0-20240226130807-4ebc7b670278 h1:XLdOEoGls+GVzMAC4D7MiqsGQcJ+lbdk3SWD/BTe26E=
github.com/Eclalang/LibraryController v0.0.0-20240226130807-4ebc7b670278/go.mod h1:WNcCa5qjRBoLVMHjvnlWd5e970WvQZ3/bq3CM9PR4z4=
github.com/Eclalang/LibraryController v0.0.0-20240226131120-e71f87c79474 h1:pPKlWU6LDRqLci9+1WVyHaiXIYzs6h1FnBA1QmCj0LA=
github.com/Eclalang/LibraryController v0.0.0-20240226131120-e71f87c79474/go.mod h1:WNcCa5qjRBoLVMHjvnlWd5e970WvQZ3/bq3CM9PR4z4=
github.com/Eclalang/LibraryController v0.0.0-20240226131523-f3db09e2ea8d h1:TQEa3qS3ADJGNZd+uQ3gncyyh/XsMiG6AHGbmI262lw=
github.com/Eclalang/LibraryController v0.0.0-20240226131523-f3db09e2ea8d/go.mod h1:WNcCa5qjRBoLVMHjvnlWd5e970WvQZ3/bq3CM9PR4z4=
github.com/Eclalang/LibraryController v0.0.0-20240226134142-5df0a35ceea4 h1:536xHWpKYyim7OxtIrpPtWmS0vHDnEHTyPPtUBHRmoA=
github.com/Eclalang/LibraryController v0.0.0-20240226134142-5df0a35ceea4/go.mod h1:ckrAYM5g9xqMlBpx0vvM3hzSmEEepvlHnr3SyWkLnHQ=
github.com/Eclalang/LibraryController v1.0.0 h1:D3z6DeVgck4xu28brEKV1UbglLk5mtO4JCqcLLVkpa8=
github.com/Eclalang/LibraryController v1.0.0/go.mod h1:yqLKnC2as6X/+zx4e2KYLpAm3rmKhfk6BksW7CMlIa4=
github.com/Eclalang/cast v0.0.0-20230412075237-1628861597c7 h1:pKeX3GmAplWLKg6uKvkBY//kZFzKASk2YjLeiCoMeV4=
github.com/Eclalang/cast v0.0.0-20230412075237-1628861597c7/go.mod h1:RJAiwgqiEPT3kmoSYTBK+JhpGOI8YXRdxrQ99zJyA00=
github.com/Eclalang/cast v1.0.0 h1:wEdtCFSLULp2Gm77/mM6mxiLOvLe/M5R3mgUfQKnzmc=
github.com/Eclalang/cast v1.0.0/go.mod h1:RJAiwgqiEPT3kmoSYTBK+JhpGOI8YXRdxrQ99zJyA00=
github.com/Eclalang/console v0.0.0-20240207094633-ad734f120a0a h1:IBaYgeCVG28vqB9hC3Hf4bOTIJ0cak+HnmtqGqITjmE=
github.com/Eclalang/console v0.0.0-20240207094633-ad734f120a0a/go.mod h1:RHRoUAVzxpcTVzX/rPm5VFjOUrshw4v9pBVDlCEmwQM=
github.com/Eclalang/console v1.0.0 h1:3gBTNAWU4zhZ/0LpnEvfuszOPNPMU/CsgmWW0fdWxiM=
github.com/Eclalang/console v1.0.0/go.mod h1:RHRoUAVzxpcTVzX/rPm5VFjOUrshw4v9pBVDlCEmwQM=
github.com/Eclalang/console v1.0.1 h1:t2Jc9cH19wT4/polJKNnnUmasl9f4pbVt81+p5lm5Kg=
github.com/Eclalang/console v1.0.1/go.mod h1:RHRoUAVzxpcTVzX/rPm5VFjOUrshw4v9pBVDlCEmwQM=
github.com/Eclalang/encoding v0.0.0-20230426103355-d5d8ac9cebd8 h1:WqTJN7ui5vYITJeiinOba/x40IXuKYPuyLkTKpQk/X0=
github.com/Eclalang/encoding v0.0.0-20230426103355-d5d8ac9cebd8/go.mod h1:fc3/K5xxbEf8fRSBhxunDFRerN3Wr6CXJ2lyA1nbxWA=
github.com/Eclalang/encoding v1.0.0 h1:hmfE+ahVfLQxAHgjdMX96gYKiL3UTgcpjWO8fRv4ODE=
github.com/Eclalang/encoding v1.0.0/go.mod h1:fc3/K5xxbEf8fRSBhxunDFRerN3Wr6CXJ2lyA1nbxWA=
github.com/Eclalang/encoding v1.0.1 h1:cntD/UAlHaHMxu/xRZiT5R37bJrJvGQ2dWKi3VePVDI=
github.com/Eclalang/encoding v1.0.1/go.mod h1:fc3/K5xxbEf8fRSBhxunDFRerN3Wr6CXJ2lyA1nbxWA=
github.com/Eclalang/hash v0.0.0-20230412075750-64b0e5c5265f h1:sS4I2LJbWvT1wFDT0IyZhbZ1i1JxnY9Lw7Vei+Pp9gI=
github.com/Eclalang/hash v0.0.0-20230412075750-64b0e5c5265f/go.mod h1:/ZoCq7JP9TBYTl79nIvL2X+VowFnarTwa8/fa9APK/w=
github.com/Eclalang/hash v1.0.0 h1:GzD6XGvAdr7Z64weypuLxjuyxXAGIebkGQzRFnuB0eY=
github.com/Eclalang/hash v1.0.0/go.mod h1:/ZoCq7JP9TBYTl79nIvL2X+VowFnarTwa8/fa9APK/w=
github.com/Eclalang/json v0.0.0-20240207094829-384a74bcf3ef h1:nLRLTTGMK1qmBIyltxiz+r7OK7PPXGGAZFqi6MYXVtE=
github.com/Eclalang/json v0.0.0-20240207094829-384a74bcf3ef/go.mod h1:yr0YD25iKfdqzbchd0LY04/IswgBow51BPomNXIK+2k=
github.com/Eclalang/json v1.0.0 h1:o8/ZAjuotZ3kmzAngwRkDPIHsVKta2o4tkaD8qn+7e8=
github.com/Eclalang/json v1.0.0/go.mod h1:yr0YD25iKfdqzbchd0LY04/IswgBow51BPomNXIK+2k=
github.com/Eclalang/json v1.0.1 h1:B3ux43HrauYz+vpy4IpiqvWtDNR/yBd4ttmArsPIaBM=
github.com/Eclalang/json v1.0.1/go.mod h1:yr0YD25iKfdqzbchd0LY04/IswgBow51BPomNXIK+2k=
github.com/Eclalang/math v0.0.0-20240207094845-3339ca7db7ff h1:iWve/tVWztLItNshB1nUepm/MmUyE8BpuL1u2p8gmcM=
github.com/Eclalang/math v0.0.0-20240207094845-3339ca7db7ff/go.mod h1:fsm8hu/CrnnYL1HNvftRyQp47ENW4QRs5AC+f2V+hOc=
github.com/Eclalang/math v1.0.0 h1:31iDg06IV/Ns45T1Z5j6mdO3sIIePNeouCGDucZj4xM=
github.com/Eclalang/math v1.0.0/go.mod h1:fsm8hu/CrnnYL1HNvftRyQp47ENW4QRs5AC+f2V+hOc=
github.com/Eclalang/mainthread v0.0.0-20171120011319-8b78f0a41ae3 h1:9uBF4ZZ6ujLF77fyGouNnFEtAefYYyb5rqsI0D6yBCc=
github.com/Eclalang/mainthread v0.0.0-20171120011319-8b78f0a41ae3/go.mod h1:bt26YnMurP1FbERLwJiHlc+k1F+KWKnTE5UiX+olI3g=
github.com/Eclalang/math v1.0.1 h1:9a9EDTHaS/Qdmwgiceo1CcWKjxRTXvVRLK/A2A7g/gg=
github.com/Eclalang/math v1.0.1/go.mod h1:fsm8hu/CrnnYL1HNvftRyQp47ENW4QRs5AC+f2V+hOc=
github.com/Eclalang/os v0.0.0-20240207163028-e6e2204c0b60 h1:vEQbT4mJQeB3pI1xO47DJ5v0syV+w/LgMgJ3xZW3tR4=
github.com/Eclalang/os v0.0.0-20240207163028-e6e2204c0b60/go.mod h1:aOlOP4WanamjHncVvr4hRCUkF0FRh6Yud1Suu9EviRo=
github.com/Eclalang/os v1.0.0 h1:/hDQ4rZyzL03zSzUNryjDzMvQrMERD055wL9KWuOhQA=
github.com/Eclalang/os v1.0.0/go.mod h1:aOlOP4WanamjHncVvr4hRCUkF0FRh6Yud1Suu9EviRo=
github.com/Eclalang/os v1.0.1 h1:s2gbGRrnztqY9+rrReTjXNXdJWlm2xL8OoKEnYinItk=
github.com/Eclalang/os v1.0.1/go.mod h1:aOlOP4WanamjHncVvr4hRCUkF0FRh6Yud1Suu9EviRo=
github.com/Eclalang/regex v0.0.0-20230412080238-d04497c06e2a h1:pcfPdmyk16qjlJfdTuQvL0xK+KYfsStevoAgtvS6w+U=
github.com/Eclalang/regex v0.0.0-20230412080238-d04497c06e2a/go.mod h1://L9ebqTHyWDZWhmsvbmWFjfczjNUHGcRKpZj8dDR00=
github.com/Eclalang/regex v1.0.1 h1:d0Uv0mA+1B3t0gknC1rZ7YwXEdY/03bMLm34yUgknXA=
github.com/Eclalang/regex v1.0.1/go.mod h1://L9ebqTHyWDZWhmsvbmWFjfczjNUHGcRKpZj8dDR00=
github.com/Eclalang/strings v0.0.0-20240207094647-1af7a6fff1bf h1:P19Ady2ppkTbzWlRCj4HDNTsmppoa0JxbGBzKBNGBLI=
github.com/Eclalang/strings v0.0.0-20240207094647-1af7a6fff1bf/go.mod h1:2FgmYwPkfSu/cd2gZ8Wy37QfMzv2eraF86V/dDrLLhk=
github.com/Eclalang/strings v1.0.0 h1:rONEmWsx5bu0cXjF9VkbLd1l2MGSB16plWYfuioawFk=
github.com/Eclalang/strings v1.0.0/go.mod h1:2FgmYwPkfSu/cd2gZ8Wy37QfMzv2eraF86V/dDrLLhk=
github.com/Eclalang/time v0.0.0-20230412080614-ad9ed2a84fb1 h1:d0EBdW1690SPusWNj+tjmihWAApch/A1OtdIUToAvoY=
github.com/Eclalang/time v0.0.0-20230412080614-ad9ed2a84fb1/go.mod h1://+Z1TD75utJJ7ob1E+D60sNezGOI3T7rhN17jYGnvM=
github.com/Eclalang/time v1.0.1 h1:POiM/SNM6MxIhvbpNXa863LKgdIV8HWvXl9xi8ijKyQ=
github.com/Eclalang/time v1.0.1/go.mod h1://+Z1TD75utJJ7ob1E+D60sNezGOI3T7rhN17jYGnvM=
github.com/faiface/mainthread v0.0.0-20171120011319-8b78f0a41ae3 h1:baVdMKlASEHrj19iqjARrPbaRisD7EuZEVJj6ZMLl1Q=
github.com/faiface/mainthread v0.0.0-20171120011319-8b78f0a41ae3/go.mod h1:VEPNJUlxl5KdWjDvz6Q1l+rJlxF2i6xqDeGuGAxa87M=
10 changes: 7 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import (
"encoding/json"
"flag"
"fmt"
"github.com/Eclalang/Ecla/interpreter"
"github.com/Eclalang/mainthread"
"strings"
"time"

"github.com/Eclalang/Ecla/interpreter"
)

var (
Expand All @@ -33,7 +33,7 @@ func init() {
flag.Parse()
}

func main() {
func eclaCli() {
args := flag.Args()
if len(args) == 0 {
fmt.Println("invalid input")
Expand Down Expand Up @@ -76,3 +76,7 @@ func main() {
fmt.Println("SYNTAX TREE:", string(txt))
}
}

func main() {
mainthread.Run(eclaCli)
}

0 comments on commit e4455f6

Please sign in to comment.