struct Bindgen::Crystal::Argument

Overview

Argument naming logic. This is not a struct.

Defined in:

bindgen/crystal/argument.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(db : TypeDatabase) #

[View source]

Instance Method Detail

def myself(klass_type : Parser::Type) : Call::Argument #

Returns a @myself argument, used in bindings inside superclass wrapper structs.


[View source]
def name(name : String, idx) : String #

Helper to get a non-colliding argument name. Makes sure that the name doesn't collide with a Crystal keyword.


[View source]
def name(argument : Call::Argument, idx) #

Helper to get a non-colliding argument name. Makes sure that the name doesn't collide with a Crystal keyword.


[View source]
def name(argument : Parser::Argument, idx) #

Helper to get a non-colliding argument name. Makes sure that the name doesn't collide with a Crystal keyword.


[View source]
def self(klass_type : Parser::Type) : Call::Argument #

Returns the _self_ argument for the method, used in bindings.


[View source]