class AdLint::FunDcl

DESCRIPTION

Function declaration information.

Public Class Methods

new(loc, linkage, scope_type, dcl_type, fun_id) click to toggle source

DESCRIPTION

Constructs the function declaration information.

PARAMETER

loc

LocationLocation where the declaration appears.

linkage

String – Function linkage type string.

scope_type

String – Declaration scope type string.

dcl_type

String – Declaration type string.

fun_id

FunctionId – Identifier of the function.

# File lib/adlint/code.rb, line 136
def initialize(loc, linkage, scope_type, dcl_type, fun_id)
  @loc        = loc
  @linkage    = linkage
  @scope_type = scope_type
  @dcl_type   = dcl_type
  @fun_id     = fun_id
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 150
def to_a
  ["DCL", *@loc.to_a, "F", @linkage, @scope_type, @dcl_type, *@fun_id.to_a]
end