Commit 7030ec32
7030ec323b35Merged
Yukihiro "Matz" Matsumoto <[email protected]> · 7 months ago · 3 files · +1 added · ~2 modified
Description
feat: add C-based parser frontend (spinel_parse.c) linking libprism
spinel_parse.c is a C implementation of spinel_parse.rb that links directly with libprism, eliminating the CRuby + Prism gem dependency for parsing. Handles all 81 node types, require_relative resolution, and produces identical AST text format.
The spinel wrapper now prefers spinel_parse_bin if available, falling back to ruby spinel_parse.rb. Both paths produce the same output.
Build: cc -O2 -I$(PRISM)/include spinel_parse.c -lprism -o spinel_parse_bin
97/99 tests+benchmarks pass (same as Ruby parser).
Co-Authored-By: Claude Opus 4.6 (1M context) [email protected]
Details
- Commit
- 7030ec323b35
- Parent
- 141eac020f04