class AdLint::Exam::CBuiltin::LabelDefExtraction

Public Class Methods

new(phase_ctxt) click to toggle source
Calls superclass method AdLint::Examination::new
# File lib/adlint/exam/c_builtin/cc1_code.rb, line 247
def initialize(phase_ctxt)
  super
  trav = phase_ctxt[:cc1_ast_traversal]
  trav.enter_generic_labeled_statement += T(:extract)
end

Private Instance Methods

do_execute(*) click to toggle source
# File lib/adlint/exam/c_builtin/cc1_code.rb, line 255
def do_execute(*) end
do_prepare(*) click to toggle source
# File lib/adlint/exam/c_builtin/cc1_code.rb, line 254
def do_prepare(*) end
extract(labeled_stmt) click to toggle source
# File lib/adlint/exam/c_builtin/cc1_code.rb, line 257
def extract(labeled_stmt)
  LABELDEF(labeled_stmt.label.location, labeled_stmt.label.value)
end