require 'parslet'

require 'rip'
require 'rip/parsers/object'

module Rip::Parsers
  module SimpleExpression
    include Parslet
    include Rip::Parsers::Object

    rule(:simple_expression) { simple_expression_fancy >> expression_terminator? }

    rule(:simple_expression_fancy) { assignment | object }

    rule(:expression_terminator) { str(';') | eol }
    rule(:expression_terminator?) { expression_terminator.maybe }
  end
end

require 'parslet'

require 'rip'
require 'rip/parsers/object'

module Rip::Parsers
  module SimpleExpression
    include Parslet
    include Rip::Parsers::Object

    rule(:simple_expression) { simple_expression_fancy >> spaces? >> expression_terminator? }

    rule(:simple_expression_fancy) { assignment | object }

    rule(:expression_terminator) { str(';') | eol }
    rule(:expression_terminator?) { expression_terminator.maybe }
  end
end

Allow spaces before an expression terminator
Allow spaces before an expression terminator
