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.
This commit is contained in:
Ryan Lopopolo
2019-06-17 21:42:19 +01:00
committed by GitHub
parent 1685c459dd
commit eeb7d3a04f
+1
View File
@@ -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;
}
}