class Metasm::C::Label
Attributes
name[RW]
statement[RW]
Public Class Methods
new(name, statement=nil)
click to toggle source
# File metasm/parse_c.rb, line 912 def initialize(name, statement=nil) @name, @statement = name, statement end
Public Instance Methods
dump(scope, r=[CRenderString.new], dep=[])
click to toggle source
# File metasm/parse_c.rb, line 3920 def dump(scope, r=[CRenderString.new], dep=[]) r.last << CRenderString.new(self, @name) << ':' dump_inner(scope, r, dep) end
dump_inner(scope, r=[CRenderString.new], dep=[])
click to toggle source
# File metasm/parse_c.rb, line 3924 def dump_inner(scope, r=[CRenderString.new], dep=[]) if not @statement; [r, dep] elsif @statement.kind_of?(Block); Statement.dump(@statement, scope, r, dep) else @statement.dump(scope, r << CRenderString.new, dep) end end
precompile(compiler, scope)
click to toggle source
# File metasm/compile_c.rb, line 923 def precompile(compiler, scope) if name and (not compiler.auto_label_list[@name]) @name = scope.nonauto_label[@name] ||= compiler.new_label(@name) end scope.statements << self if statement @statement.precompile(compiler, scope) @statement = nil end end