Sha256: cdbf206101da46c9c347e670f061d14c1178eeeb6dce645ffddb8b1449573b90
Contents?: true
Size: 864 Bytes
Versions: 13
Compression:
Stored size: 864 Bytes
Contents
module Cucumber module Parser grammar Table rule table table_row+ { def build Ast::Table.new(raw) end def raw elements.map{|e| e.build} end } end rule table_row space* '|' cells:(cell '|')+ space* (eol+ / eof) { def build row = cells.elements.map do |elt| value = elt.cell.text_value.strip value.empty? ? nil : value end class << row attr_accessor :line end row.line = cells.line row end } end rule cell (!('|' / eol) .)* end rule space [ \t] end rule eol "\n" / ("\r" "\n"?) end rule eof !. end end end end
Version data entries
13 entries across 13 versions & 1 rubygems