Documentation ¶
Overview ¶
Package util holds a few useful functions both for the forest package as well as for automation.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // LuaMatchRx matches a lua-match predicate and it's corresponding pattern. LuaMatchRx = regexp.MustCompile(`#(?:not-)?lua-match\?.*?"(.*?)"\s*\)`) )
Functions ¶
func LuaPatternToGoRegexp ¶ added in v1.5.130
LuaPatternToGoRegexp converts a Lua pattern to Go regexp.
func NormalizeLangPackName ¶
NormalizeLangPackName normalizes the language and package names. Normally (in ~98% of the cases) the language, package and folder name are identical. In a few cases however, it is not (see the README).
func QueryLuaMatch2Match ¶ added in v1.5.130
QueryLuaMatch2Match converts all `lua-match?` and `not-lua-match?` predicates in a query with `match?` predicates and the corresponding Lua pattern to Go regexp. TODO: Implement verification? VerifyCount := bytes.Count(out, []byte("#lua-match? @")).
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.