зеркало из https://github.com/github/ruby.git
[ruby/prism] FSL follow-up
https://github.com/ruby/prism/commit/097fd2a54f
This commit is contained in:
Родитель
53a77d9b90
Коммит
572e791567
|
@ -37,7 +37,7 @@ pm_options_offset_set(pm_options_t *options, uint32_t offset) {
|
|||
*/
|
||||
PRISM_EXPORTED_FUNCTION void
|
||||
pm_options_frozen_string_literal_set(pm_options_t *options, bool frozen_string_literal) {
|
||||
options->frozen_string_literal = frozen_string_literal ? 1 : -1;
|
||||
options->frozen_string_literal = frozen_string_literal ? PM_OPTIONS_FROZEN_STRING_LITERAL_ENABLED : PM_OPTIONS_FROZEN_STRING_LITERAL_DISABLED;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -7183,9 +7183,9 @@ parser_lex_magic_comment_encoding(pm_parser_t *parser) {
|
|||
static void
|
||||
parser_lex_magic_comment_frozen_string_literal_value(pm_parser_t *parser, const uint8_t *start, const uint8_t *end) {
|
||||
if ((start + 4 <= end) && pm_strncasecmp(start, (const uint8_t *) "true", 4) == 0) {
|
||||
parser->frozen_string_literal = 1;
|
||||
parser->frozen_string_literal = PM_OPTIONS_FROZEN_STRING_LITERAL_ENABLED;
|
||||
} else if ((start + 5 <= end) && pm_strncasecmp(start, (const uint8_t *) "false", 5) == 0) {
|
||||
parser->frozen_string_literal = -1;
|
||||
parser->frozen_string_literal = PM_OPTIONS_FROZEN_STRING_LITERAL_DISABLED;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -18922,7 +18922,7 @@ pm_parser_init(pm_parser_t *parser, const uint8_t *source, size_t size, const pm
|
|||
.in_keyword_arg = false,
|
||||
.current_param_name = 0,
|
||||
.semantic_token_seen = false,
|
||||
.frozen_string_literal = 0,
|
||||
.frozen_string_literal = PM_OPTIONS_FROZEN_STRING_LITERAL_UNSET,
|
||||
.current_regular_expression_ascii_only = false
|
||||
};
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче