From eeb7d3a04f9380d64c20b77d428d1de5ecafbb33 Mon Sep 17 00:00:00 2001 From: Ryan Lopopolo Date: Mon, 17 Jun 2019 21:42:19 +0100 Subject: Support parsing a Regexp literal with 'o' option CRuby supports a 'o' `Regexp` option for `Regexp` literals, e.g. `/foo/o` that disables multiple interpolation passes. This commit adds support for parsing such literals. Nothing is done with the option, it is consumed and ignored by the parser. --- mrbgems/mruby-compiler/core/parse.y | 1 + 1 file changed, 1 insertion(+) (limited to 'mrbgems/mruby-compiler/core') diff --git a/mrbgems/mruby-compiler/core/parse.y b/mrbgems/mruby-compiler/core/parse.y index 96a9453b6..5e4889978 100644 --- a/mrbgems/mruby-compiler/core/parse.y +++ b/mrbgems/mruby-compiler/core/parse.y @@ -4526,6 +4526,7 @@ parse_string(parser_state *p) case 'm': f |= 4; break; case 'u': f |= 16; break; case 'n': f |= 32; break; + case 'o': break; default: tokadd(p, re_opt); break; } } -- cgit v1.2.3