1#ifndef PRISM_INTERNAL_OPTIONS_H
2#define PRISM_INTERNAL_OPTIONS_H
28 PM_OPTIONS_VERSION_UNSET = 0,
31 PM_OPTIONS_VERSION_CRUBY_3_3 = 1,
34 PM_OPTIONS_VERSION_CRUBY_3_4 = 2,
37 PM_OPTIONS_VERSION_CRUBY_3_5 = 3,
40 PM_OPTIONS_VERSION_CRUBY_4_0 = 3,
43 PM_OPTIONS_VERSION_CRUBY_4_1 = 4,
46 PM_OPTIONS_VERSION_LATEST = PM_OPTIONS_VERSION_CRUBY_4_1
47} pm_options_version_t;
54bool pm_options_version_parse(
const char *version,
size_t length, pm_options_version_t *result);
68 void *shebang_callback_data;
110 pm_options_version_t version;
113 uint8_t command_line;
122 int8_t frozen_string_literal;
141 bool encoding_locked;
172 bool attach_comments;
177 PM_OPTIONS_SHEBANG_NONE,
178 PM_OPTIONS_SHEBANG_COMMENT,
179 PM_OPTIONS_SHEBANG_OTHER,
180 PM_OPTIONS_SHEBANG_RUBY
181} pm_options_shebang_type_t;
185pm_options_shebang_search_p(
const pm_options_t *options, pm_options_shebang_type_t shebang) {
188 (shebang != PM_OPTIONS_SHEBANG_RUBY) &&
191 (shebang == PM_OPTIONS_SHEBANG_OTHER && options->main_script && !options->scopes_count)
267void pm_options_read(
pm_options_t *options,
const char *data);
The options that can be passed to parsing.
static const uint8_t PM_OPTIONS_COMMAND_LINE_X
A bit representing whether or not the command line -x option was set.
void(* pm_options_shebang_callback_t)(pm_options_t *options, const uint8_t *source, size_t length, void *shebang_callback_data)
The callback called when additional switches are found in a shebang comment that need to be processed...
A view of a sequence of bytes.