class AdLint::XRefVar

DESCRIPTION

Variable cross reference information.

Public Class Methods

new(loc, referrer, ref_type, var_name) click to toggle source

DESCRIPTION

Constructs the cross reference information.

PARAMETER

loc

LocationLocation where the cross-ref appears.

referrer

FunctionId – Accessing function identifier.

ref_type

String – Referencing type string.

var_name

String – Accessed variable name.

# File lib/adlint/code.rb, line 389
def initialize(loc, referrer, ref_type, var_name)
  @loc      = loc
  @referrer = referrer
  @ref_type = ref_type
  @var_name = var_name
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 402
def to_a
  ["DEP", *@loc.to_a, "X", "V", *@referrer.to_a, @ref_type, @var_name]
end