class AdLint::VarDef

DESCRIPTION

Variable definition information.

Public Class Methods

new(loc, linkage, scope_type, sc_type, var_name, type_rep) click to toggle source

DESCRIPTION

Constructs the variable definition information.

PARAMETER

loc

LocationLocation where the definition appears.

linkage

String – Variable linkage type string.

scope_type

String – Variable scope type string.

sc_type

String – Variable storage class type.

var_name

String – Variable name.

type_rep

String – Variable type representation string.

# File lib/adlint/code.rb, line 168
def initialize(loc, linkage, scope_type, sc_type, var_name, type_rep)
  @loc        = loc
  @linkage    = linkage
  @scope_type = scope_type
  @sc_type    = sc_type
  @var_name   = var_name
  @type_rep   = type_rep
end

Private Instance Methods

to_a() click to toggle source

DESCRIPTION

Converts this code structure information into array representation.

RETURN VALUE

Array< Object > – Array representation.

# File lib/adlint/code.rb, line 183
def to_a
  ["DEF", *@loc.to_a, "V", @linkage, @scope_type, @sc_type, @var_name,
    @type_rep]
end