aboutsummaryrefslogtreecommitdiff
path: root/src/urubu/spec/grammar/util.go
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2024-12-11 16:26:16 -0300
committerEuAndreh <eu@euandre.org>2024-12-11 16:26:21 -0300
commit38f4733efc322f10eda7800259a95d682139592a (patch)
treee34e46a0ff17218fedd724e3ebd8eff477190fa3 /src/urubu/spec/grammar/util.go
parentrm LICENSE (diff)
downloadcotia-38f4733efc322f10eda7800259a95d682139592a.tar.gz
cotia-38f4733efc322f10eda7800259a95d682139592a.tar.xz
Consolidate packages spread across multiple files into single one
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)
-}