module

Cruml::Parsers::VariableParser

Inherits Cruml::Parsers::RegexPatterns

Parses variable declarations from Crystal code

Instance methods

matches_instance_var?(var_name : String, ivar_name : String) : Bool

Checks if the variable name matches the instance variable

Source
parse_class_attribute(body_string : String) : NamedTuple(visibility: String, name: String, type: String) | Nil

Parses class variable attributes like class_property, class_getter

Source
parse_class_var_declaration(line : String) : NamedTuple(name: String, type: String) | Nil

Parses class variable declarations like @@name : Type

Source
parse_instance_attribute(expression_string : String) : NamedTuple(visibility: String, name: String, type: String) | Nil

Parses instance variable attributes like property, getter, setter

Source
parse_instance_var_assignment(line : String, arg_name : String) : String | Nil

Parses instance variable assignment in constructor like @name = arg_name

Source
parse_instance_var_declaration(line : String) : NamedTuple(name: String, type: String) | Nil

Parses instance variable declarations like @name : Type

Source