Method: Heist::Scheme#_nt_paren

Defined in:
lib/heist/parser/scheme.rb

#_nt_parenObject



1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
# File 'lib/heist/parser/scheme.rb', line 1564

def _nt_paren
  start_index = index
  if node_cache[:paren].has_key?(index)
    cached = node_cache[:paren][index]
    @index = cached.interval.end if cached
    return cached
  end

  if input.index(Regexp.new('[\\(\\)\\[\\]]'), index) == index
    r0 = instantiate_node(SyntaxNode,input, index...(index + 1))
    @index += 1
  else
    r0 = nil
  end

  node_cache[:paren][start_index] = r0

  return r0
end