transpiler

package
v0.14.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 12, 2017 License: MIT Imports: 12 Imported by: 0

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 GetAllocationSizeNode added in v0.12.0

func GetAllocationSizeNode(node ast.Node) ast.Node

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 TranspileAST

func TranspileAST(fileName, packageName string, p *program.Program, root ast.Node) error

TranspileAST iterates through the Clang AST and builds a Go AST

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL