![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
decaffeinate-parser
Advanced tools
This project uses the official CoffeeScript parser to parse CoffeeScript source code, then maps the AST generated by the parser to one more suitable for the decaffeinate project based on the AST generated by CoffeeScriptRedux.
This project might be useful to anyone who wants to work with a CoffeeScript AST and prefers the AST generated by CoffeeScriptRedux, but wants to avoid the source compatibility issues introduced by using that project. Note that it is not 100% compatible with CoffeeScriptRedux:
if
statements, etc. have blocks for bodies.TemplateLiteral
from ES6 rather
than being a series of nested ConcatOp
nodes.Herestring
rather than String
.LogicalNotOp
generated by an unless
) are
marked as such with a virtual: true
property.do
is handled with the DoOp
node type.for-in
loops do not have an implicit step
property.super
is supported in classes.extends
is usable as a binary operator and in class declarations.//
(floor division) is supported.$ npm install --save-dev decaffeinate-parser
This example gets the names of the parameters in the add
function:
import { parse } from 'decaffeinate-parser';
const program = parse('add = (a, b) -> a + b');
const assignment = program.body.statements[0];
const fn = assignment.expression;
console.log(fn.parameters.map(param => param.data)); // [ 'a', 'b' ]
FAQs
A better AST for CoffeeScript, inspired by CoffeeScriptRedux.
The npm package decaffeinate-parser receives a total of 6,210 weekly downloads. As such, decaffeinate-parser popularity was classified as popular.
We found that decaffeinate-parser demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.