daily pastebin goal
22%
SHARE
TWEET

Untitled

a guest Sep 14th, 2018 51 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. rule :quoted_string do
  2.   str('"') >>
  3.   ((str('\\') >> any) | (str('"').absent? >> any)).repeat.as(:string) >>
  4.   str('"')
  5. end
  6. rule :single_quote_string do
  7.   str("'") >>
  8.   ((str('\\') >> any) | (str("'").absent? >> any)).repeat.as(:string) >>
  9.   str("'")
  10. end
  11. rule(:any_string) { quoted_string | single_quote_string }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top