Documentation ¶
Overview ¶
Package transpiler handles the conversion between the Clang AST and the Go AST.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateFuncType ¶ added in v0.16.14
GenerateFuncType in according to types
Type: *ast.FuncType { . Func: 13:7 . Params: *ast.FieldList { . . Opening: 13:12 . . List: []*ast.Field (len = 2) { . . . 0: *ast.Field { . . . . Type: *ast.Ident { . . . . . NamePos: 13:13 . . . . . Name: "int" . . . . } . . . } . . . 1: *ast.Field { . . . . Type: *ast.Ident { . . . . . NamePos: 13:17 . . . . . Name: "int" . . . . } . . . } . . } . . Closing: 13:20 . } . Results: *ast.FieldList { . . Opening: - . . List: []*ast.Field (len = 1) { . . . 0: *ast.Field { . . . . Type: *ast.Ident { . . . . . NamePos: 13:21 . . . . . Name: "string" . . . . } . . . } . . } . . Closing: - . } }
func GetAllocationSizeNode ¶ added in v0.12.0
GetAllocationSizeNode returns the node that, if evaluated, would return the size (in bytes) of a memory allocation operation. For example:
(int *)malloc(sizeof(int))
Would return the node that represents the "sizeof(int)".
If the node does not represent an allocation operation (such as calling malloc, calloc, realloc, etc.) then nil is returned.
In the case of calloc() it will return a new BinaryExpr that multiplies both arguments.
func NewFunctionField ¶ added in v0.19.2
Types ¶
This section is empty.