Documentation ¶
Index ¶
- Constants
- func FindFunctions(project string, functions []string, verbose bool) []*ast.FuncDecl
- func FormatNode(node ast.Node) string
- func GetNodeType(node ast.Node) string
- func GetTabs(index int) string
- func LoadDirs(dirs ...string) (*aster.Program, error)
- func ReturnAssignments(collection StatementCollection) string
- func UniqueID() string
- func Validate(functions []string) []string
- type StatementCollection
Constants ¶
View Source
const Version string = "0.2.2"
Version ejja's current version
Variables ¶
This section is empty.
Functions ¶
func FindFunctions ¶
FindFunctions returns a list of *ast.FuncDecl matching given functions in a given folder path use verbose flag for printing found functions files.
func LoadDirs ¶
LoadDirs parses the source code of Go files under the directories and loads a new program.
func ReturnAssignments ¶
func ReturnAssignments(collection StatementCollection) string
ReturnAssignments returns the assignment statements as a string
Types ¶
type StatementCollection ¶
type StatementCollection struct { FunctionSig string Listing []ast.Stmt FuncStack []ast.FuncDecl AssignDeclStack []ast.Stmt AssignStack []ast.Stmt ExprStack []ast.Stmt IfStack []ast.Stmt BadStack []ast.Stmt DeclStack []ast.Stmt EmptyStack []ast.Stmt LabeledStack []ast.Stmt SendStack []ast.Stmt IncDecStack []ast.Stmt GoStack []ast.Stmt DeferStack []ast.Stmt ReturnStack []ast.Stmt BranchStack []ast.Stmt BlockStack []ast.Stmt SwitchStack []ast.Stmt TypeSwitchStack []ast.Stmt CommStack []ast.Stmt SelectStack []ast.Stmt ForStack []ast.Stmt RangeStack []ast.Stmt }
StatementCollection is a collection of all statements in target function as stacks
func ParseFunctions ¶
func ParseFunctions(project string, functions []string, verbose bool) []StatementCollection
ParseFunctions returns a list of collections of statments of the given functions if found. verbose prints found file names TODO: error handling
Click to show internal directories.
Click to hide internal directories.