Class: Fdlint::Parser::JS::FunctionDeclaraion

Inherits:
Element show all
Defined in:
lib/fdlint/parser/js/struct.rb

Overview

Function declaraion key word ‘function’ parsed as FunctionDeclaraion

Instance Attribute Summary collapse

Attributes inherited from Element

#left, #right, #type

Instance Method Summary collapse

Methods inherited from Element

#contains?, #position, #text

Constructor Details

#initialize(name, parameters, body, pos) ⇒ FunctionDeclaraion

Returns a new instance of FunctionDeclaraion.



82
83
84
85
# File 'lib/fdlint/parser/js/struct.rb', line 82

def initialize(name, parameters, body, pos)
  super 'function', name, parameters, pos
  @body = body
end

Instance Attribute Details

#bodyObject (readonly)

Returns the value of attribute body.



78
79
80
# File 'lib/fdlint/parser/js/struct.rb', line 78

def body
  @body
end