class AdLint::GVarDcl

DESCRIPTION

Global variable declaration information.

Public Class Methods

new(loc, var_name, type_rep) click to toggle source

DESCRIPTION

Constructs the global variable declaration information.

PARAMETER

loc

LocationLocation where the declaration appears.

var_name

String – Global variable name.

type_rep

String – Type of the global variable.

# File lib/adlint/code.rb, line 107
def initialize(loc, var_name, type_rep)
  @loc      = loc
  @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 119
def to_a
  ["DCL", *@loc.to_a, "V", @var_name, @type_rep]
end