Sha256: e7d38982dfd51250380ff03b50c84583240ae9b995c27ffc8aaf7d21d66c9b81

Contents?: true

Size: 408 Bytes

Versions: 3

Compression:

Stored size: 408 Bytes

Contents

# frozen_string_literal: true

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

3 entries across 3 versions & 1 rubygems

Version Path
basic101-1.0.2 lib/basic101/parser/on_goto_statement.rb
basic101-1.0.1 lib/basic101/parser/on_goto_statement.rb
basic101-1.0.0 lib/basic101/parser/on_goto_statement.rb