Struct ruby_prism_sys::pm_options_t
source · #[repr(C)]pub struct pm_options_t {
pub filepath: pm_string_t,
pub line: i32,
pub encoding: pm_string_t,
pub scopes_count: usize,
pub scopes: *mut pm_options_scope_t,
pub frozen_string_literal: bool,
pub suppress_warnings: bool,
}Expand description
The options that can be passed to the parser.
Fields§
§filepath: pm_string_tThe name of the file that is currently being parsed.
line: i32The line within the file that the parse starts on. This value is 0-indexed.
encoding: pm_string_tThe name of the encoding that the source file is in. Note that this must correspond to a name that can be found with Encoding.find in Ruby.
scopes_count: usizeThe number of scopes surrounding the code that is being parsed.
scopes: *mut pm_options_scope_tThe scopes surrounding the code that is being parsed. For most parses this will be NULL, but for evals it will be the locals that are in scope surrounding the eval.
frozen_string_literal: boolWhether or not the frozen string literal option has been set.
suppress_warnings: boolWhether or not we should suppress warnings. This is purposefully negated so that the default is to not suppress warnings, which allows us to still create an options struct with zeroed memory.
Trait Implementations§
source§impl Clone for pm_options_t
impl Clone for pm_options_t
source§fn clone(&self) -> pm_options_t
fn clone(&self) -> pm_options_t
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more