Class: CGenerator::Prototype

Inherits:
CFragment show all
Defined in:
lib/cgen/cgen.rb

Direct Known Subclasses

MethodPrototype

Defined Under Namespace

Classes: ArgumentAccumulator

Instance Attribute Summary

Attributes inherited from Accumulator

#name, #parent

Instance Method Summary collapse

Methods inherited from Template

accumulator

Methods inherited from Accumulator

#accept?, #add, #add_one, #add_one_really, #inspect, #inspect_one, #output, #output_one, #to_s

Constructor Details

#initialize(name, parent) ⇒ Prototype

Returns a new instance of Prototype.



1561
1562
1563
1564
# File 'lib/cgen/cgen.rb', line 1561

def initialize name, parent
  super
  add scope!, return_type!, " ", name, arguments!
end

Instance Method Details

#argcObject



1568
1569
1570
# File 'lib/cgen/cgen.rb', line 1568

def argc
  arguments!.size
end

#separatorObject



1566
# File 'lib/cgen/cgen.rb', line 1566

def separator; ""; end