util

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2017 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExprToString

func ExprToString(n ast.Node) (string, error)

ExprToString fn

func GetExprCaller

func GetExprCaller(n ast.Node) (ast.Expr, error)

GetExprCaller gets the expression caller e.g. x.Cool() => x

func GetIdentifier

func GetIdentifier(n ast.Node) (*ast.Ident, error)

GetIdentifier gets rightmost identifier if there is one

func GoSourcePath

func GoSourcePath() (string, error)

GoSourcePath gets the fullpath to Go's source files

func JoyPath

func JoyPath() (string, error)

JoyPath absolute path

func MethodsFromInterface

func MethodsFromInterface(n *ast.InterfaceType, path, name string) (methods []string)

MethodsFromInterface fn

func RuntimePath

func RuntimePath() (string, error)

RuntimePath gets the path of our runtime

func Unique

func Unique(defs []def.Definition) []def.Definition

Unique returns definitions unique by their id

func VDOMSourcePath

func VDOMSourcePath() (string, error)

VDOMSourcePath gets the fullpath to the VDOM source files

Types

type JSTag

type JSTag struct {
	Rename  string
	Omit    bool
	Async   bool
	Rewrite string
}

JSTag struct

func JSTagFromComment

func JSTagFromComment(n *ast.CommentGroup) (tag JSTag, err error)

JSTagFromComment parses a js tag if there is one

func JSTagFromString

func JSTagFromString(tagstring string) (tag JSTag, err error)

JSTagFromString parse tag

Jump to

Keyboard shortcuts

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