class AdLint::TypeDcl

DESCRIPTION

Type declaration information.

Public Class Methods

new(loc, dcl_type, type_name, type_rep) click to toggle source

DESCRIPTION

Constructs the type declaration information.

PARAMETER

loc

LocationLocation where the declaration appears.

dcl_type

String – Type string of the type declaration.

type_name

String – Type name.

type_rep

String – Type representation.

# File lib/adlint/code.rb, line 79
def initialize(loc, dcl_type, type_name, type_rep)
  @loc       = loc
  @dcl_type  = dcl_type
  @type_name = type_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 92
def to_a
  ["DCL", *@loc.to_a, "T", @dcl_type, @type_name, @type_rep]
end