summaryrefslogtreecommitdiffhomepage
path: root/mrbgems/mruby-compiler/core/parse.y
diff options
context:
space:
mode:
authorRyan Lopopolo <[email protected]>2019-06-17 21:42:19 +0100
committerGitHub <[email protected]>2019-06-17 21:42:19 +0100
commiteeb7d3a04f9380d64c20b77d428d1de5ecafbb33 (patch)
tree5c949f3966482f071e158e5ecc51fae3625d9e31 /mrbgems/mruby-compiler/core/parse.y
parent1685c459dde54956f4203d2f739dadd2465e7c2d (diff)
downloadmruby-eeb7d3a04f9380d64c20b77d428d1de5ecafbb33.tar.gz
mruby-eeb7d3a04f9380d64c20b77d428d1de5ecafbb33.zip
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.
Diffstat (limited to 'mrbgems/mruby-compiler/core/parse.y')
-rw-r--r--mrbgems/mruby-compiler/core/parse.y1
1 files changed, 1 insertions, 0 deletions
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;
}
}