Sha256: bd1e2e20107fe5151fab324fbed39b0d2a8d5a4d920a2e880a45e2ca4806538f

Contents?: true

Size: 388 Bytes

Versions: 7

Compression:

Stored size: 388 Bytes

Contents

class Nydp::Builtin::Parse
  include Nydp::Builtin::Base, Singleton

  def builtin_invoke vm, args
    parser = Nydp::Parser.new(vm.ns)
    tokens = Nydp::Tokeniser.new Nydp::StringReader.new args.car.to_s
    exprs  = []
    while !tokens.finished
      expr = parser.expression(tokens)
      exprs << expr unless expr == nil
    end
    vm.push_arg Nydp::Pair.from_list exprs
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
nydp-0.3.0 lib/nydp/builtin/parse.rb
nydp-0.2.6 lib/nydp/builtin/parse.rb
nydp-0.2.5 lib/nydp/builtin/parse.rb
nydp-0.2.3 lib/nydp/builtin/parse.rb
nydp-0.2.2 lib/nydp/builtin/parse.rb
nydp-0.2.1 lib/nydp/builtin/parse.rb
nydp-0.2.0 lib/nydp/builtin/parse.rb