aboutsummaryrefslogtreecommitdiff
path: root/spec/grammar/util.go
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2024-12-10 12:29:03 -0300
committerEuAndreh <eu@euandre.org>2024-12-10 12:29:03 -0300
commit8359c047aaebe274a2d811d61922b571ca7d10df (patch)
tree070e0ed93d27a842776ada805eeb4270e7e3c806 /spec/grammar/util.go
parentStart building test files (diff)
downloadurubu-8359c047aaebe274a2d811d61922b571ca7d10df.tar.gz
urubu-8359c047aaebe274a2d811d61922b571ca7d10df.tar.xz
Namespace packages with "urubu/"
Diffstat (limited to 'spec/grammar/util.go')
-rw-r--r--spec/grammar/util.go21
1 files changed, 0 insertions, 21 deletions
diff --git a/spec/grammar/util.go b/spec/grammar/util.go
deleted file mode 100644
index bf3f233..0000000
--- a/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)
-}