v0.0.212
This commit is contained in:
parent
b5f9b6b638
commit
647ec64c3b
@ -31,13 +31,13 @@ type EnumDef struct {
|
||||
Values []EnumDefVal
|
||||
}
|
||||
|
||||
var rexPackage = rext.W(regexp.MustCompile("^package\\s+(?P<name>[A-Za-z0-9_]+)\\s*$"))
|
||||
var rexPackage = rext.W(regexp.MustCompile(`^package\s+(?P<name>[A-Za-z0-9_]+)\s*$`))
|
||||
|
||||
var rexEnumDef = rext.W(regexp.MustCompile("^\\s*type\\s+(?P<name>[A-Za-z0-9_]+)\\s+(?P<type>[A-Za-z0-9_]+)\\s*//\\s*(@enum:type).*$"))
|
||||
var rexEnumDef = rext.W(regexp.MustCompile(`^\s*type\s+(?P<name>[A-Za-z0-9_]+)\s+(?P<type>[A-Za-z0-9_]+)\s*//\s*(@enum:type).*$`))
|
||||
|
||||
var rexValueDef = rext.W(regexp.MustCompile("^\\s*(?P<name>[A-Za-z0-9_]+)\\s+(?P<type>[A-Za-z0-9_]+)\\s*=\\s*(?P<value>(\"[A-Za-z0-9_:]+\"|[0-9]+))\\s*(//(?P<descr>.*))?.*$"))
|
||||
var rexValueDef = rext.W(regexp.MustCompile(`^\s*(?P<name>[A-Za-z0-9_]+)\s+(?P<type>[A-Za-z0-9_]+)\s*=\s*(?P<value>("[A-Za-z0-9_:]+"|[0-9]+))\s*(//(?P<descr>.*))?.*$`))
|
||||
|
||||
var rexChecksumConst = rext.W(regexp.MustCompile("const ChecksumGenerator = \"(?P<cs>[A-Za-z0-9_]*)\""))
|
||||
var rexChecksumConst = rext.W(regexp.MustCompile(`const ChecksumGenerator = "(?P<cs>[A-Za-z0-9_]*)"`))
|
||||
|
||||
func GenerateEnumSpecs(sourceDir string, destFile string) error {
|
||||
|
||||
|
@ -162,7 +162,7 @@ func nameOfFunction(f any) string {
|
||||
fname = fname[:len(fname)-len("-fm")]
|
||||
}
|
||||
|
||||
suffix := rext.W(regexp.MustCompile("\\.func[0-9]+$"))
|
||||
suffix := rext.W(regexp.MustCompile(`\.func[0-9]+(?:\.[0-9]+)*$`))
|
||||
|
||||
if match, ok := suffix.MatchFirst(fname); ok {
|
||||
fname = fname[:len(fname)-match.FullMatch().Length()]
|
||||
|
@ -1,5 +1,5 @@
|
||||
package goext
|
||||
|
||||
const GoextVersion = "0.0.211"
|
||||
const GoextVersion = "0.0.212"
|
||||
|
||||
const GoextVersionTimestamp = "2023-07-26T10:40:42+0200"
|
||||
const GoextVersionTimestamp = "2023-07-26T10:44:26+0200"
|
||||
|
@ -8,7 +8,7 @@ import (
|
||||
|
||||
func TestGroupByNameOrEmpty1(t *testing.T) {
|
||||
|
||||
regex1 := W(regexp.MustCompile("0(?P<group1>A+)B(?P<group2>C+)0"))
|
||||
regex1 := W(regexp.MustCompile(`0(?P<group1>A+)B(?P<group2>C+)0`))
|
||||
|
||||
match1, ok1 := regex1.MatchFirst("Hello 0AAAABCCC0 Bye.")
|
||||
|
||||
@ -26,7 +26,7 @@ func TestGroupByNameOrEmpty1(t *testing.T) {
|
||||
|
||||
func TestGroupByNameOrEmpty2(t *testing.T) {
|
||||
|
||||
regex1 := W(regexp.MustCompile("0(?P<group1>A+)B(?P<group2>C+)(?P<group3>C+)?0"))
|
||||
regex1 := W(regexp.MustCompile(`0(?P<group1>A+)B(?P<group2>C+)(?P<group3>C+)?0`))
|
||||
|
||||
match1, ok1 := regex1.MatchFirst("Hello 0AAAABCCC0 Bye.")
|
||||
|
||||
|
@ -71,12 +71,12 @@ func SupportsColors() bool {
|
||||
}
|
||||
}
|
||||
|
||||
var term256Regex = regexp.MustCompile("(?i)-256(color)?$")
|
||||
var term256Regex = regexp.MustCompile(`(?i)-256(color)?$`)
|
||||
if term256Regex.MatchString(termenv) {
|
||||
return true
|
||||
}
|
||||
|
||||
var termBasicRegex = regexp.MustCompile("(?i)^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux")
|
||||
var termBasicRegex = regexp.MustCompile(`(?i)^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux`)
|
||||
|
||||
if termBasicRegex.MatchString(termenv) {
|
||||
return true
|
||||
|
Loading…
Reference in New Issue
Block a user