class AdLint::FunDef

DESCRIPTION

Function definition information.

Public Class Methods

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

DESCRIPTION

Constructs the function definition information.

PARAMETER

loc

LocationLocation where the definition appears.

linkage

String – Function linkage type string.

scope_type

String – Definition scope type string.

fun_id

FunctionId – Function identifier.

lines

Integer – Physical lines.

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