Class: AdLint::Cc1::NamedFunction
- Inherits:
-
Function
- Object
- Object
- TypedObject
- Function
- AdLint::Cc1::NamedFunction
- Includes:
- Nameable
- Defined in:
- lib/adlint/cc1/object.rb
Direct Known Subclasses
Instance Attribute Summary
Attributes included from Nameable
Attributes inherited from TypedObject
Attributes inherited from Object
Attributes included from Bindable
Instance Method Summary collapse
- #call ⇒ Object
- #designated_by_lvalue? ⇒ Boolean
-
#initialize(dcl_or_def, type, name) ⇒ NamedFunction
constructor
A new instance of NamedFunction.
- #signature ⇒ Object
Methods included from Nameable
Methods inherited from Function
#builtin?, #explicit?, #function?, #implicit?, #name, #named?, #temporary?, #variable?
Methods inherited from TypedObject
#to_pointer, #to_pointer_value, #to_value, #to_variable
Methods inherited from Object
#declared_as_auto?, #declared_as_extern?, #declared_as_register?, #declared_as_static?, #function?, #named?, #storage_class_specifiers, #temporary?, #variable?
Methods included from Bindable
Constructor Details
#initialize(dcl_or_def, type, name) ⇒ NamedFunction
Returns a new instance of NamedFunction.
1017 1018 1019 1020 |
# File 'lib/adlint/cc1/object.rb', line 1017 def initialize(dcl_or_def, type, name) super(dcl_or_def, type) self.name = name end |
Instance Method Details
#call ⇒ Object
1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 |
# File 'lib/adlint/cc1/object.rb', line 1026 def call(*) case name when "exit", "_exit", "abort" BreakEvent.of_return.throw when "longjmp", "siglongjmp" BreakEvent.of_return.throw else super end end |
#designated_by_lvalue? ⇒ Boolean
1022 1023 1024 |
# File 'lib/adlint/cc1/object.rb', line 1022 def designated_by_lvalue? true end |
#signature ⇒ Object
1037 1038 1039 |
# File 'lib/adlint/cc1/object.rb', line 1037 def signature FunctionSignature.new(name, type) end |