dbaumgarten / yodk

Development Kit for Starbase's ingame programming language YOLOL
MIT License
57 stars 16 forks source link

Compiler failure related to github hosting services #92

Closed kylerhenry closed 2 years ago

kylerhenry commented 2 years ago

Describe the bug Compiler Failure

To Reproduce Steps to reproduce the behavior:

  1. compile nolol using yodk compile filename.nolol

Expected behavior The file is compiled into yolol

Example Code/Screenshots

panic: interface conversion: *ast.UnaryOperation is not nast.NestableElement: missing method El

goroutine 1 [running]:
github.com/dbaumgarten/yodk/pkg/nolol/nast.AcceptNestableElementList(0xab70a0, 0xc000200de0, 0xaae2e0, 0xc000496550, 0xc000262200, 0x17, 0x17, 0xc000008000, 0x96c4c0, 0x9737e0, ...)
        /home/travis/gopath/src/github.com/dbaumgarten/yodk/pkg/nolol/nast/visitor.go:218 +0x2d0
github.com/dbaumgarten/yodk/pkg/nolol/nast.(*Block).Accept(0xc000200de0, 0xaae2e0, 0xc000496550, 0xc000261000, 0xfffffffffffffffc)
        /home/travis/gopath/src/github.com/dbaumgarten/yodk/pkg/nolol/nast/visitor.go:57 +0xbc
github.com/dbaumgarten/yodk/pkg/parser/ast.AcceptChild(0xaae2e0, 0xc000496550, 0xab70a0, 0xc000200de0, 0x0, 0x0, 0x0, 0x0)
        /home/travis/gopath/src/github.com/dbaumgarten/yodk/pkg/parser/ast/visitor.go:234 +0x50
github.com/dbaumgarten/yodk/pkg/nolol/nast.(*WhileLoop).Accept(0xc000261000, 0xaae2e0, 0xc000496550, 0x7f, 0x0)
        /home/travis/gopath/src/github.com/dbaumgarten/yodk/pkg/nolol/nast/visitor.go:123 +0x178
github.com/dbaumgarten/yodk/pkg/nolol/nast.AcceptElementList(0xab72a0, 0xc0002005a0, 0xaae2e0, 0xc000496550, 0xc000354d00, 0x82, 0x82, 0x40d02f, 0x10, 0x96f1c0, ...)
        /home/travis/gopath/src/github.com/dbaumgarten/yodk/pkg/nolol/nast/visitor.go:181 +0x11d
github.com/dbaumgarten/yodk/pkg/nolol/nast.(*Program).Accept(0xc0002005a0, 0xaae2e0, 0xc000496550, 0x1, 0x0)
        /home/travis/gopath/src/github.com/dbaumgarten/yodk/pkg/nolol/nast/visitor.go:14 +0xbc
github.com/dbaumgarten/yodk/pkg/nolol.(*Converter).ProcessNodes(0xc0002300f0, 0xab7020, 0xc0002300f0)
        /home/travis/gopath/src/github.com/dbaumgarten/yodk/pkg/nolol/converter.go:269 +0x34e
github.com/dbaumgarten/yodk/pkg/nolol.(*Converter).Convert(0xc0002300f0, 0xc00001e420, 0x14, 0xabab20)
        /home/travis/gopath/src/github.com/dbaumgarten/yodk/pkg/nolol/converter.go:72 +0x5e
github.com/dbaumgarten/yodk/cmd.compileFile(0xc00001e420, 0x14)
        /home/travis/gopath/src/github.com/dbaumgarten/yodk/cmd/compile.go:40 +0x2c0
github.com/dbaumgarten/yodk/cmd.glob..func1(0xe4a9a0, 0xc00020e2d0, 0x1, 0x1)
        /home/travis/gopath/src/github.com/dbaumgarten/yodk/cmd/compile.go:23 +0x10f
github.com/spf13/cobra.(*Command).execute(0xe4a9a0, 0xc00020e2b0, 0x1, 0x1, 0xe4a9a0, 0xc00020e2b0)
        /home/travis/gopath/pkg/mod/github.com/spf13/cobra@v0.0.5/command.go:830 +0x2a4
github.com/spf13/cobra.(*Command).ExecuteC(0xe4bb20, 0x444971, 0xe0c240, 0xc000051f78)
        /home/travis/gopath/pkg/mod/github.com/spf13/cobra@v0.0.5/command.go:914 +0x302
github.com/spf13/cobra.(*Command).Execute(...)
        /home/travis/gopath/pkg/mod/github.com/spf13/cobra@v0.0.5/command.go:864
github.com/dbaumgarten/yodk/cmd.Execute()
        /home/travis/gopath/src/github.com/dbaumgarten/yodk/cmd/root.go:24 +0x38
main.main()
        /home/travis/gopath/src/github.com/dbaumgarten/yodk/main.go:8 +0x27

Platform:

Additional context N/A

dbaumgarten commented 2 years ago

Can you provide a few more infos on this? V0.1.7 is working fine for me on windows 10.

What NOLOL file are you trying to compile? The error you get sounds to me like it may be triggered by a syntax-errors in your nolol-code.

And I don't really understand the title. How is this "related to GitHub hosting services"?

kylerhenry commented 2 years ago

False claim; closing