utils

package
v0.0.0-...-1151bb8 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2022 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Overview

Package for internal utilities.

Index

Constants

This section is empty.

Variables

View Source
var VHDLKeywords map[string]bool = map[string]bool{
	"alias": true, "array": true, "assert": true,
	"begin": true, "boolean": true, "buffer": true,
	"constant": true,
	"downto":   true,
	"end":      true, "entity": true,
	"failure": true, "false": true, "function": true,
	"generic": true,
	"impure":  true, "in": true, "inout": true, "integer": true, "is": true,
	"natural": true,
	"of":      true, "others": true, "out": true,
	"package": true, "port": true, "positive": true, "procedure": true, "protected": true, "pure": true,
	"range": true, "real": true, "real_vector": true, "record": true, "report": true, "return": true,
	"severity": true, "shared": true, "signal": true, "signed": true, "std_logic": true, "std_logic_vector": true, "string": true, "subtype": true,
	"time": true, "time_vector": true, "to": true, "true": true, "type": true,
	"unsigned": true,
	"variable": true,
}

Functions

func BoldCodeTerminal

func BoldCodeTerminal(lang string, code string) string

func Deindent

func Deindent(s string) string

func Dewhitespace

func Dewhitespace(s string) string

func FirstLine

func FirstLine(s string) string

FirstLine returns first line from the string s without '\n' rune.

func GetFilePathsByExtension

func GetFilePathsByExtension(ext string, workDir string) ([]string, error)

func GetVHDLFilePaths

func GetVHDLFilePaths() []string

func HdlGenArgs

func HdlGenArgs(line []byte) []string

hdlGenArgs parses line containing 'hdl:gen' and returns its arguments.

func IsIgnoredVHDLFile

func IsIgnoredVHDLFile(filepath string) bool

IsIgnoredVHDLFile returns true if given file should be ignored. For example, it may be a Xilinx encrypted file. In such case there is no point in analyzing its content.

func IsSingleLine

func IsSingleLine(s string) bool

func IsTestbench

func IsTestbench(name string) bool

func IsTooGeneralPath

func IsTooGeneralPath(path string) bool

func IsValidLang

func IsValidLang(lang string) bool

func VHDLDecomment

func VHDLDecomment(s string) string

VHDLDecomment assumes that string has already passed Deindent() process.

func VHDLDeindentDecomment

func VHDLDeindentDecomment(s string) string

func VHDLHTMLBold

func VHDLHTMLBold(s string) string

func VHDLTerminalBold

func VHDLTerminalBold(s string) string

func ValidLangs

func ValidLangs() [1]string

Types

This section is empty.

Jump to

Keyboard shortcuts

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