Sha256: 4fe54fb2a61d9548826d5d73fe15b4757ba0aeee66bc0fda3c71e05e7eea972d

Contents?: true

Size: 383 Bytes

Versions: 1

Compression:

Stored size: 383 Bytes

Contents

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

  def builtin_call arg
    parser = Nydp.new_parser
    tokens = Nydp.new_tokeniser Nydp::StringReader.new "parse", arg.to_s
    exprs  = []
    while !tokens.finished
      expr = parser.expression(tokens)
      exprs << expr unless expr == nil && tokens.finished
    end
    Nydp::Pair.from_list exprs
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
nydp-0.6.0 lib/nydp/builtin/parse.rb