module Cruml::Parsers::RegexPatterns

Overview

Centralized regex patterns for parsing Crystal code

Direct including types

Defined in:

parsers/regex_patterns.cr

Constant Summary

CLASS_VARS = /^@@(\w+) : ([\w:| ()]+)$/

Matches class variable declarations: @@name : Type

CLASS_VARS_ATTRIBUTE = /(class_getter|class_property|class_setter)\((\w+) : (\w+)\)/

Matches class variable attributes: class_getter(name : Type)

EXTEND = /^extend (\w+(?:::\w+)*)$/

Matches extend statements: extend MyModule

INCLUDE = /^include (\w+(?:::\w+)*)$/

Matches include statements: include MyModule

INSTANCE_VAR_ASSIGNMENT = /^@(\w+) = (\w+)$/

Matches instance variable assignment in initialize: @name = arg_name

INSTANCE_VARS = /^@(\w+) : ([\w:| ()]+)$/

Matches instance variable declarations: @name : Type

INSTANCE_VARS_ATTRIBUTE = /^(property|getter|setter|property\?|getter\?)\((\w+) : ([\w:| ]+)\)/

Matches instance variable attributes: property(name : Type)