Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # addType()
- # Input => struct A14 { char a1; }
- # (struct_specifier 25 1 23
- # (type_identifier 25 8 3 "A14")
- # (field_declaration_list 25 12 12
- # (field_declaration 25 14 8
- # (primitive_type 25 14 4 "char")
- # (field_identifier 25 19 2 "a1")
- # )
- # )
- # )
- # addTypeObject()
- # Output => A14* = object
- # a1*: cchar
- # nkTypeDef(
- # nkPostfix(
- # nkIdent("*"),
- # nkIdent("A14")
- # ),
- # nkEmpty(),
- # nkObjectTy(
- # nkEmpty(),
- # nkEmpty(),
- # nkRecList(
- # nkIdentDefs(
- # nkPostfix(
- # nkIdent("*"),
- # nkIdent("a1")
- # ),
- # nkIdent("cchar"),
- # nkEmpty()
- # )
- # )
- # )
- # )
- # addType()
- # Input => struct A1 { char *a2; int a3; }
- # (struct_specifier 26 1 31
- # (type_identifier 26 8 2 "A1")
- # (field_declaration_list 26 11 21
- # (field_declaration 26 13 9
- # (primitive_type 26 13 4 "char")
- # (pointer_declarator 26 18 3 "*a2"
- # (field_identifier 26 19 2 "a2")
- # )
- # )
- # (field_declaration 26 23 7
- # (primitive_type 26 23 3 "int")
- # (field_identifier 26 27 2 "a3")
- # )
- # )
- # )
- # addTypeObject()
- # Output => A1* = object
- # a2*: cstring
- # a3*: cint
- # nkTypeDef(
- # nkPostfix(
- # nkIdent("*"),
- # nkIdent("A1")
- # ),
- # nkEmpty(),
- # nkObjectTy(
- # nkEmpty(),
- # nkEmpty(),
- # nkRecList(
- # nkIdentDefs(
- # nkPostfix(
- # nkIdent("*"),
- # nkIdent("a2")
- # ),
- # nkIdent("cstring"),
- # nkEmpty()
- # ),
- # nkIdentDefs(
- # nkPostfix(
- # nkIdent("*"),
- # nkIdent("a3")
- # ),
- # nkIdent("cint"),
- # nkEmpty()
- # )
- # )
- # )
- # )
- type
- A14* = object
- a1*: cstring
- A1* = object
- a2*: cstring
- a3*: cint
Advertisement
Add Comment
Please, Sign In to add comment