diff options
author | Ondřej Surý <ondrej@sury.org> | 2011-08-03 16:54:30 +0200 |
---|---|---|
committer | Ondřej Surý <ondrej@sury.org> | 2011-08-03 16:54:30 +0200 |
commit | 28592ee1ea1f5cdffcf85472f9de0285d928cf12 (patch) | |
tree | 32944e18b23f7fe4a0818a694aa2a6dfb1835463 /src/pkg/regexp/regexp.go | |
parent | e836bee4716dc0d4d913537ad3ad1925a7ac32d0 (diff) | |
download | golang-28592ee1ea1f5cdffcf85472f9de0285d928cf12.tar.gz |
Imported Upstream version 59upstream/59
Diffstat (limited to 'src/pkg/regexp/regexp.go')
-rw-r--r-- | src/pkg/regexp/regexp.go | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/src/pkg/regexp/regexp.go b/src/pkg/regexp/regexp.go index e3221ac9d..e8d4c087c 100644 --- a/src/pkg/regexp/regexp.go +++ b/src/pkg/regexp/regexp.go @@ -87,16 +87,16 @@ func (e Error) String() string { // Error codes returned by failures to parse an expression. var ( - ErrInternal = Error("internal error") - ErrUnmatchedLpar = Error("unmatched '('") - ErrUnmatchedRpar = Error("unmatched ')'") - ErrUnmatchedLbkt = Error("unmatched '['") - ErrUnmatchedRbkt = Error("unmatched ']'") - ErrBadRange = Error("bad range in character class") - ErrExtraneousBackslash = Error("extraneous backslash") - ErrBadClosure = Error("repeated closure (**, ++, etc.)") - ErrBareClosure = Error("closure applies to nothing") - ErrBadBackslash = Error("illegal backslash escape") + ErrInternal = Error("regexp: internal error") + ErrUnmatchedLpar = Error("regexp: unmatched '('") + ErrUnmatchedRpar = Error("regexp: unmatched ')'") + ErrUnmatchedLbkt = Error("regexp: unmatched '['") + ErrUnmatchedRbkt = Error("regexp: unmatched ']'") + ErrBadRange = Error("regexp: bad range in character class") + ErrExtraneousBackslash = Error("regexp: extraneous backslash") + ErrBadClosure = Error("regexp: repeated closure (**, ++, etc.)") + ErrBareClosure = Error("regexp: closure applies to nothing") + ErrBadBackslash = Error("regexp: illegal backslash escape") ) const ( @@ -158,6 +158,7 @@ func (i *instr) print() { // Regexp is the representation of a compiled regular expression. // The public interface is entirely through methods. +// A Regexp is safe for concurrent use by multiple goroutines. type Regexp struct { expr string // the original expression prefix string // initial plain text string |