module Cruml::Parsers::VariableParser

Overview

Parses variable declarations from Crystal code

Included Modules

Extended Modules

Defined in:

parsers/variable_parser.cr

Instance Method Summary

Instance Method Detail

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

Checks if the variable name matches the instance variable


[View source]
def parse_class_attribute(body_string : String) : NamedTuple(visibility: String, name: String, type: String) | Nil #

Parses class variable attributes like class_property, class_getter


[View source]
def parse_class_var_declaration(line : String) : NamedTuple(name: String, type: String) | Nil #

Parses class variable declarations like @@name : Type


[View source]
def parse_instance_attribute(expression_string : String) : NamedTuple(visibility: String, name: String, type: String) | Nil #

Parses instance variable attributes like property, getter, setter


[View source]
def parse_instance_var_assignment(line : String, arg_name : String) : String | Nil #

Parses instance variable assignment in constructor like @name = arg_name


[View source]
def parse_instance_var_declaration(line : String) : NamedTuple(name: String, type: String) | Nil #

Parses instance variable declarations like @name : Type


[View source]