Yarp RubyRuby 解释器

联合创作 · 2023-10-02 05:40

Yarp (Yet Another Ruby Parser) 是一个 Ruby 解释器,目前处于早期阶段,旨在取代现有的 CRuby 解释器。


Yarp 的三个目标:



  • 可移植性——支持在其他项目、实现和工具中使用这个解释器

  • 容错——支持从尽可能多的语法错误中恢复

  • 可维护性——成为一个长期存在的项目,具有良好的健康度。这意味着要具备教程、示例、文档、干净的代码、良好的测试覆盖率等。


目录结构



.
├── Makefile configuration to compile the shared library and native tests
├── Rakefile configuration to compile the native extension and run the Ruby tests
├── bin
│   ├── template generates code from the nodes and tokens configured by config.yml
│   └── templates directory containing all of the various templates
├── config.yml specification for tokens and nodes in the tree
├── ext
│   └── yarp
│   └── extension.c the native extension that interacts with librubyparser
├── lib
│   ├── yarp support files for the Ruby library
│   └── yarp.rb main entrypoint into the Ruby library
├── src
│   ├── yarp.c main entrypoint into the shared library
│   └── yarp.h main header file for the shared library
└── test Ruby tests for the Ruby library
浏览 23
点赞
评论
收藏
分享

手机扫一扫分享

编辑 分享
举报
评论
图片
表情
推荐
点赞
评论
收藏
分享

手机扫一扫分享

编辑 分享
举报