Class: CodeMiner::UnknownExpression

Inherits:
Expression show all
Defined in:
lib/codeminer/expressions/unknown_expression.rb

Instance Attribute Summary collapse

Attributes inherited from Expression

#args, #block, #delimiter, #src, #token

Instance Method Summary collapse

Methods inherited from Expression

not_implemented

Methods included from SourceExtract::Usage

#adjust_src, #column=, #end_column=, #end_line=, #line=, #src, #src_extract

Constructor Details

#initialize(type, value, src, children, line, column) ⇒ UnknownExpression

Returns a new instance of UnknownExpression.



7
8
9
# File 'lib/codeminer/expressions/unknown_expression.rb', line 7

def initialize(type, value, src, children, line, column)
  @type, @value, @src, @children, @line, @column = type, value, src, children, line, column
end

Instance Attribute Details

#columnObject (readonly)

Returns the value of attribute column.



5
6
7
# File 'lib/codeminer/expressions/unknown_expression.rb', line 5

def column
  @column
end

#lineObject (readonly)

Returns the value of attribute line.



5
6
7
# File 'lib/codeminer/expressions/unknown_expression.rb', line 5

def line
  @line
end

#typeObject (readonly)

Returns the value of attribute type.



5
6
7
# File 'lib/codeminer/expressions/unknown_expression.rb', line 5

def type
  @type
end

#valueObject (readonly)

Returns the value of attribute value.



5
6
7
# File 'lib/codeminer/expressions/unknown_expression.rb', line 5

def value
  @value
end

Instance Method Details

#<<(obj) ⇒ Object



11
12
13
# File 'lib/codeminer/expressions/unknown_expression.rb', line 11

def <<(obj)
  @children << obj
end

#add(obj, src) ⇒ Object



19
20
21
22
23
# File 'lib/codeminer/expressions/unknown_expression.rb', line 19

def add(obj, src)
  @children << obj
  @src = src
  self
end

#eachObject



15
16
17
# File 'lib/codeminer/expressions/unknown_expression.rb', line 15

def each
  @children
end

#end_columnObject



29
30
31
# File 'lib/codeminer/expressions/unknown_expression.rb', line 29

def end_column
  column + value.to_s.length
end

#end_lineObject



25
26
27
# File 'lib/codeminer/expressions/unknown_expression.rb', line 25

def end_line
  line
end