aboutsummaryrefslogtreecommitdiff
path: root/src/urubu/spec/grammar/util.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/urubu/spec/grammar/util.go')
-rw-r--r--src/urubu/spec/grammar/util.go21
1 files changed, 0 insertions, 21 deletions
diff --git a/src/urubu/spec/grammar/util.go b/src/urubu/spec/grammar/util.go
deleted file mode 100644
index bf3f233..0000000
--- a/src/urubu/spec/grammar/util.go
+++ /dev/null
@@ -1,21 +0,0 @@
-package grammar
-
-import "strings"
-
-var rep = strings.NewReplacer(
- `.`, `\.`,
- `*`, `\*`,
- `+`, `\+`,
- `?`, `\?`,
- `|`, `\|`,
- `(`, `\(`,
- `)`, `\)`,
- `[`, `\[`,
- `\`, `\\`,
-)
-
-// EscapePattern escapes the special characters.
-// For example, EscapePattern(`+`) returns `\+`.
-func EscapePattern(s string) string {
- return rep.Replace(s)
-}