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 version: pm_options_version_t,
pub frozen_string_literal: 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 1-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. Scopes are ordered from the outermost scope to the innermost one.
version: pm_options_version_tThe version of prism that we should be parsing with. This is used to allow consumers to specify which behavior they want in case they need to parse exactly as a specific version of CRuby.
frozen_string_literal: boolWhether or not the frozen string literal option has been set.
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