Skip to content

Commit

Permalink
Leverage the regex engine at max, gh-77
Browse files Browse the repository at this point in the history
  • Loading branch information
jmettraux committed Sep 14, 2022
1 parent 052cfde commit 42ca309
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions lib/fugit/cron.rb
Original file line number Diff line number Diff line change
Expand Up @@ -721,12 +721,12 @@ def list_dom(i); jseq(:dom, i, :dom_elt, :comma); end
def list_mon(i); jseq(:mon, i, :mon_elt, :comma); end
def list_dow(i); jseq(:dow, i, :dow_elt_, :comma); end

def lsec_(i); seq(nil, i, :comma, '?', :list_sec, :comma, '?', :s); end
def lmin_(i); seq(nil, i, :comma, '?', :list_min, :comma, '?', :s); end
def lhou_(i); seq(nil, i, :comma, '?', :list_hou, :comma, '?', :s); end
def ldom_(i); seq(nil, i, :comma, '?', :list_dom, :comma, '?', :s); end
def lmon_(i); seq(nil, i, :comma, '?', :list_mon, :comma, '?', :s); end
def ldow(i); seq(nil, i, :comma, '?', :list_dow, :comma, '?'); end
def lsec_(i); seq(nil, i, :comma?, :list_sec, :comma?, :s); end
def lmin_(i); seq(nil, i, :comma?, :list_min, :comma?, :s); end
def lhou_(i); seq(nil, i, :comma?, :list_hou, :comma?, :s); end
def ldom_(i); seq(nil, i, :comma?, :list_dom, :comma?, :s); end
def lmon_(i); seq(nil, i, :comma?, :list_mon, :comma?, :s); end
def ldow(i); seq(nil, i, :comma?, :list_dow, :comma?); end

def _tz_name(i)
rex(nil, i, / +[A-Z][a-zA-Z0-9+\-]+(\/[A-Z][a-zA-Z0-9+\-_]+){0,2}/)
Expand Down

0 comments on commit 42ca309

Please sign in to comment.