summaryrefslogtreecommitdiff
path: root/script/glob/gitignore.lua
diff options
context:
space:
mode:
Diffstat (limited to 'script/glob/gitignore.lua')
-rw-r--r--script/glob/gitignore.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/script/glob/gitignore.lua b/script/glob/gitignore.lua
index f96aa627..315efa37 100644
--- a/script/glob/gitignore.lua
+++ b/script/glob/gitignore.lua
@@ -35,7 +35,9 @@ local parser = m.P {
+ object('?', m.P'?')
+ object('[]', m.V'Range')
,
- ['Char'] = object('char', (1 - m.S',{}[]*?/\\')^1),
+ ['SimpleChar'] = m.P(1) - m.S',{}[]*?/',
+ ['EscChar'] = m.P'\\' / '' * m.P(1),
+ ['Char'] = object('char', m.Cs((m.V'EscChar' + m.V'SimpleChar')^1)),
['FSymbol'] = object('**', m.P'**'),
['Range'] = m.P'[' * m.Ct(m.V'RangeUnit'^0) * m.P']'^-1,
['RangeUnit'] = m.Ct(- m.P']' * m.C(m.P(1)) * (m.P'-' * - m.P']' * m.C(m.P(1)))^-1),