Sha256: 763d7b3c01a951276b7ebcb1d8e5bf514145701b76be53e52d5e7131909aeacd
Contents?: true
Size: 387 Bytes
Versions: 2
Compression:
Stored size: 387 Bytes
Contents
module Basic101 class Parser < Parslet::Parser rule(:for_statement) do str('FOR') >> space? >> scalar_reference.as(:reference) >> space? >> str('=') >> space? >> expression.as(:from) >> space? >> str('TO') >> space? >> expression.as(:to) >> (space? >> str('STEP') >> space? >> expression).maybe.as(:step) end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
basic101-0.4.0 | lib/basic101/parser/for_statement.rb |
basic101-0.2.0 | lib/basic101/parser/for_statement.rb |