mirror of
https://github.com/atom/atom.git
synced 2026-01-24 14:28:14 -05:00
PEG 💄
This commit is contained in:
@@ -17,10 +17,13 @@ address
|
||||
}
|
||||
|
||||
substitution
|
||||
= "s" _ "/" find:([^/]*) "/" replace:([^/]*) "/" _ options:[g]* {
|
||||
return new Substitution(find.join(''), replace.join(''), options);
|
||||
= "s" _ "/" find:pattern "/" replace:pattern "/" _ options:[g]* {
|
||||
return new Substitution(find, replace, options);
|
||||
}
|
||||
|
||||
pattern
|
||||
= pattern:[^/]* { return pattern.join('') }
|
||||
|
||||
integer
|
||||
= digits:[0-9]+ { return parseInt(digits.join('')); }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user