Sha256: 2492b035c2bc2e103a29a61b5d2ca127a6d4dbd1fd59a9a96387d6796f420ced

Contents?: true

Size: 377 Bytes

Versions: 2

Compression:

Stored size: 377 Bytes

Contents

module Basic101

  class Parser < Parslet::Parser

    rule(:on_goto_statement) do
      str('ON').as(:on_goto) >>
        space? >>expression.as(:expression) >>
        space? >> str('GOTO') >>
        (
         space? >> integer >>
         (
          space? >> str(',') >>
          space? >> integer
          ).repeat(0)
         ).as(:line_numbers)
    end

  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
basic101-0.4.0 lib/basic101/parser/on_goto_statement.rb
basic101-0.2.0 lib/basic101/parser/on_goto_statement.rb