Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

panic: unknown node type: ColdAttr #878

Open
derFunk opened this issue Jan 6, 2021 · 1 comment
Open

panic: unknown node type: ColdAttr #878

derFunk opened this issue Jan 6, 2021 · 1 comment

Comments

@derFunk
Copy link

derFunk commented Jan 6, 2021

clang -v

Apple clang version 12.0.0 (clang-1200.0.32.2)
Target: x86_64-apple-darwin19.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

c2go -v: v0.26.0 Erbium 2020-03-17
git rev-parse HEAD: 5836250bdbbb93bd9875c6cb6b6770d7838b64f9
OS: MacOS Catalina 10.15.6

./c2go transpile examples/prime.c
panic: unknown node type: 'ColdAttr 0x7fb11288b790 <col:42>'

goroutine 28 [running]:
github.com/elliotchance/c2go/ast.Parse(0xc00036ca2d, 0x20, 0x12ade78, 0x5)
	/Users/akatzig/Code/derfunk/c2go/ast/ast.go:294 +0x3412
main.convertLinesToNodes(0xc000377c00, 0x38, 0x1c1, 0xc000298300, 0xc00033e7b0, 0x1)
	/Users/akatzig/Code/derfunk/c2go/main.go:89 +0x1a6
main.convertLinesToNodesParallel.func1.1(0xc00008d2c0, 0xc0002f4038, 0xc000377c00, 0x38, 0x1c1, 0x0)
	/Users/akatzig/Code/derfunk/c2go/main.go:113 +0x53
created by main.convertLinesToNodesParallel.func1
	/Users/akatzig/Code/derfunk/c2go/main.go:111 +0x12a
@elliotchance
Copy link
Owner

This happens becuase c2go can't understand that node type. This happens a lot, but the fix is to add a new node type with a regexp to consume it. See this for an example fix: #832

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants