step

package
v0.0.0-...-fff90db Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Expand

func Expand(identc <-chan entity.Identifier, expanders ...entity.Expander) chan entity.Identifier

Expand returns a channel of entity.Identifier where each element has been processed by every provided Expander.

func Extract

func Extract(files []entity.File, factory entity.ExtractorFactory) chan entity.Identifier

Extract traverses each Abstract Syntax Tree and applies an extractor to retrieve the identifiers that are interest of us.

func Merge

func Merge(parsedc <-chan entity.File) []entity.File

Merge joins files when necessary.

func Mine

func Mine(parsed []entity.File, miners ...entity.Miner) map[string]entity.Miner

Mine traverses each Abstract Syntax Tree and applies every given miner to extract the required pre-processing information. It returns a map of miners after work is done.

func Normalize

func Normalize(identc chan entity.Identifier) chan entity.Identifier

Normalize returns a channel of entity.Identifier where each element has been normalized.

func Parse

func Parse(filesc <-chan entity.File) chan entity.File

Parse parses a file and creates an Abstract Syntax Tree (AST) representation. It handles and returns a channel of entity.File elements.

func Read

func Read(ctx context.Context, sc repository.SourceCodeRepository, location string, filenames []string) <-chan entity.File

Read filters only .go files and reads them.

func Split

func Split(identc <-chan entity.Identifier, splitters ...entity.Splitter) chan entity.Identifier

Split returns a channel of entity.Identifier where each element has been processed by every provided Splitter.

Types

This section is empty.

Jump to

Keyboard shortcuts

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