ruby-syntax-tree / node-syntax-tree Goto Github PK
View Code? Open in Web Editor NEWA node package for accessing Syntax Tree through WASM
License: MIT License
A node package for accessing Syntax Tree through WASM
License: MIT License
So that we can bundle everything in prettier. For more context see
We are looking to update our OCLIF cli https://saf-cli.mitre.org/ inspec-delta utiliy and ts-inspec-objects library https://github.com/mitre/ts-inspec-objects in the MITRE SAF CLI to help ease upkeep of our ruby DSL inspec profiles which are generated from XCCDF security benchmarks.
These tools used to be in ruby but we moved to typescript to ease end-user use and adoption.
We are looking to use the Web Assembler Ruby work to use ASTs to parse, update and lint our profiles rather then recreate that body of work in TS/JS and throw away years of work and more importantly keep running into parse errors, corner cases when there are 'tools that do that already' but we also face the challenge of mixing ruby and TS/JS.
Is there any reason only part of the syntax_tree was not fully bound here? We can update it but wanted to ask if there was a reason not all parts were added and it would not work well before we looked into it and perhaps submitted a PR.
Hello, first very cool work!
For a)
Assuming I parse and generate the AST and then 'do my processing and update the AST' which generator should I pass the modified AST to rewrite my transformed ruby file
for b) I was trying to do something simple like move a node in the tree and write out a new file, the docs don't seem to call out a specific library for OO style ast traversal, manipulation, unless the assumption is that we would use TreeWriter. Can you provide some insight or pointers to documentation or blog that might help?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.