Sha256: 041aaa4394574c8fe74cca1d90ba65bc32a6b412bcfd42ad600aab22345f1159
Contents?: true
Size: 1.14 KB
Versions: 18
Compression:
Stored size: 1.14 KB
Contents
module Cucumber module Parser # TIP: When you hack on the grammar, just delete py_string.rb in this directory. # Also make sure you have uninstalled all cucumber gems (don't forget xxx-cucumber # github gems). # # Treetop will then generate the parser in-memory. When you're happy, just generate # the rb file with tt feature.tt grammar PyString include Common rule py_string open_py_string s:(!close_py_string .)* close_py_string { def at_line?(line) line >= open_py_string.line && line <= close_py_string.line end def build(filter=nil) Ast::PyString.new(open_py_string.line, close_py_string.line, s.text_value, open_py_string.indentation) end } end rule open_py_string indent:space* '"""' space* eol { def indentation indent.text_value.length end def line indent.line end } end rule close_py_string eol space* quotes:'"""' white { def line quotes.line end } end end end end
Version data entries
18 entries across 18 versions & 5 rubygems