lib/cucumber/parser/table.rb in cucumber-0.5.3 vs lib/cucumber/parser/table.rb in cucumber-0.6.0
- old
+ new
@@ -38,11 +38,14 @@
def _nt_table
start_index = index
if node_cache[:table].has_key?(index)
cached = node_cache[:table][index]
- @index = cached.interval.end if cached
+ if cached
+ cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
+ @index = cached.interval.end
+ end
return cached
end
s0, i0 = [], index
loop do
@@ -102,11 +105,14 @@
def _nt_table_row
start_index = index
if node_cache[:table_row].has_key?(index)
cached = node_cache[:table_row][index]
- @index = cached.interval.end if cached
+ if cached
+ cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
+ @index = cached.interval.end
+ end
return cached
end
i0, s0 = index, []
s1, i1 = [], index
@@ -229,10 +235,13 @@
def _nt_cell
start_index = index
if node_cache[:cell].has_key?(index)
cached = node_cache[:cell][index]
- @index = cached.interval.end if cached
+ if cached
+ cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
+ @index = cached.interval.end
+ end
return cached
end
s0, i0 = [], index
loop do
\ No newline at end of file