sdk/golang/Standard Library/GoRegexpSyntax
Standard Library

GoRegexpSyntax

Go stdlib package — regexp/syntax. Auto-indexed from CDN. Method-level security roles have not been annotated; rule writers should inspect the source before use.

Other Methods

.Compile()Neutral
#
Signature
Compile(re *Regexp) (*Prog, error)

Compile compiles the regexp into a program to be executed.

.EmptyOpContext()Neutral
#
Signature
EmptyOpContext(r1 rune, r2 rune) EmptyOp

EmptyOpContext returns the zero-width assertions

.Error.Error()Neutral
#
Signature
Error.Error() string

Error.Error function.

.ErrorCode.String()Neutral
#
Signature
ErrorCode.String() string

ErrorCode.String function.

.Inst.MatchEmptyWidth()Neutral
#
Signature
Inst.MatchEmptyWidth(before rune, after rune) bool

MatchEmptyWidth reports whether the instruction matches

.Inst.MatchRune()Neutral
#
Signature
Inst.MatchRune(r rune) bool

MatchRune reports whether the instruction matches (and consumes) r.

.Inst.MatchRunePos()Neutral
#
Signature
Inst.MatchRunePos(r rune) int

MatchRunePos checks whether the instruction matches (and consumes) r.

.Inst.String()Neutral
#
Signature
Inst.String() string

Inst.String function.

.InstOp.String()Neutral
#
Signature
InstOp.String() string

InstOp.String function.

.IsWordChar()Neutral
#
Signature
IsWordChar(r rune) bool

IsWordChar reports whether r is considered a “word character”

Fully-Qualified Names

FQNField
regexp/syntaxfqns[0]

Wrong FQN → 0 findings. Verify with: change fqns to garbage → must produce 0 results.

Import

go.mod
// standard library — no go.mod entry required
rule.py
from codepathfinder.go_rule import ...  # regexp/syntax