transpiler

package
v0.25.3 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2018 License: MIT Imports: 17 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 GenerateFuncType

func GenerateFuncType(fields, returns []string) *goast.FuncType

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 GetUintptrForPointer

func GetUintptrForPointer(p *program.Program, expr goast.Expr, exprType string) (goast.Expr, string, error)

GetUintptrForPointer - return uintptr for pointer Example : uint64(uintptr(unsafe.Pointer( ...pointer... )))

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