We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
TODO: Add compound_literal_expr.go in the ast package.
main.c
struct node { int x; int y; }; int main() { struct node a[] = {{10,20},{30,40}}; struct node b[] = {(struct node){10,20},(struct node){30,40}}; return a[1].x + b[1].y; }
c2go transpile main.c
panic: unknown node type: 'CompoundLiteralExpr 0x5646ed33f5b0 <col:21, col:40> 'struct node':'struct node' lvalue'
c2go ast main.c
TranslationUnitDecl 0x558ade1b3df0 <<invalid sloc>> <invalid sloc> |-TypedefDecl 0x558ade1b42e8 <<invalid sloc>> <invalid sloc> implicit __int128_t '__int128' | `-BuiltinType 0x558ade1b4040 '__int128' |-TypedefDecl 0x558ade1b4348 <<invalid sloc>> <invalid sloc> implicit __uint128_t 'unsigned __int128' | `-BuiltinType 0x558ade1b4060 'unsigned __int128' |-TypedefDecl 0x558ade1b43d8 <<invalid sloc>> <invalid sloc> implicit __builtin_ms_va_list 'char *' | `-PointerType 0x558ade1b43a0 'char *' | `-BuiltinType 0x558ade1b3e80 'char' |-TypedefDecl 0x558ade1b4688 <<invalid sloc>> <invalid sloc> implicit __builtin_va_list 'struct __va_list_tag [1]' | `-ConstantArrayType 0x558ade1b4630 'struct __va_list_tag [1]' 1 | `-RecordType 0x558ade1b44b0 'struct __va_list_tag' | `-Record 0x558ade1b4428 '__va_list_tag' |-RecordDecl 0x558ade1b46d8 <main.c:1:1, line:4:1> line:1:8 struct node definition | |-FieldDecl 0x558ade1b4790 <line:2:2, col:6> col:6 x 'int' | `-FieldDecl 0x558ade1b47e8 <line:3:2, col:6> col:6 referenced y 'int' `-FunctionDecl 0x558ade1b4878 <line:6:1, line:11:1> line:6:5 main 'int ()' `-CompoundStmt 0x558ade201630 <col:12, line:11:1> |-DeclStmt 0x558ade2014c8 <line:8:2, col:63> | `-VarDecl 0x558ade1b4a18 <col:2, col:62> col:14 used b 'struct node [2]' cinit | `-InitListExpr 0x558ade2013c0 <col:20, col:62> 'struct node [2]' | |-ImplicitCastExpr 0x558ade201400 <col:21, col:40> 'struct node':'struct node' <LValueToRValue> | | `-CompoundLiteralExpr 0x558ade2011f0 <col:21, col:40> 'struct node':'struct node' lvalue | | `-InitListExpr 0x558ade2011a0 <col:34, col:40> 'struct node':'struct node' | | |-IntegerLiteral 0x558ade1b4a98 <col:35> 'int' 10 | | `-IntegerLiteral 0x558ade1b4ab8 <col:38> 'int' 20 | `-ImplicitCastExpr 0x558ade201420 <col:42, col:61> 'struct node':'struct node' <LValueToRValue> | `-CompoundLiteralExpr 0x558ade201318 <col:42, col:61> 'struct node':'struct node' lvalue | `-InitListExpr 0x558ade2012c8 <col:55, col:61> 'struct node':'struct node' | |-IntegerLiteral 0x558ade201238 <col:56> 'int' 30 | `-IntegerLiteral 0x558ade201258 <col:59> 'int' 40 `-ReturnStmt 0x558ade201618 <line:10:2, col:14> `-ImplicitCastExpr 0x558ade201600 <col:9, col:14> 'int' <LValueToRValue> `-MemberExpr 0x558ade2015c8 <col:9, col:14> 'int' lvalue .y 0x558ade1b47e8 `-ArraySubscriptExpr 0x558ade2015a0 <col:9, col:12> 'struct node':'struct node' lvalue |-ImplicitCastExpr 0x558ade201588 <col:9> 'struct node *' <ArrayToPointerDecay> | `-DeclRefExpr 0x558ade2014e0 <col:9> 'struct node [2]' lvalue Var 0x558ade1b4a18 'b' 'struct node [2]' `-IntegerLiteral 0x558ade201508 <col:11> 'int' 1
Requires #264 to be fixed in order to test.
$ clang --version clang version 3.8.1-24 (tags/RELEASE_381/final) Target: x86_64-pc-linux-gnu $ go version go version go1.9.2 linux/amd64
The text was updated successfully, but these errors were encountered:
02cbbf0
No branches or pull requests
TODO: Add compound_literal_expr.go in the ast package.
main.c
c2go transpile main.c
c2go ast main.c
Requires #264 to be fixed in order to test.
The text was updated successfully, but these errors were encountered: