Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

decaffeinate-parser

Package Overview
Dependencies
Maintainers
1
Versions
156
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

decaffeinate-parser - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

10

lib/parser.js

@@ -79,2 +79,11 @@ 'use strict';

function locationWithLastPosition(loc, last) {
return {
first_line: loc.first_line,
first_column: loc.first_column,
last_line: last.last_line,
last_column: last.last_column
};
}
function mergeLocations(left, right) {

@@ -330,2 +339,3 @@ var first_line = undefined;

}
node.locationData = locationWithLastPosition(node.locationData, node.body.locationData);
if (node.object) {

@@ -332,0 +342,0 @@ return makeNode('ForOf', node.locationData, {

2

package.json
{
"name": "decaffeinate-parser",
"version": "1.0.1",
"version": "1.0.2",
"description": "A better AST for CoffeeScript, inspired by CoffeeScriptRedux.",

@@ -5,0 +5,0 @@ "main": "lib/parser.js",

@@ -16,2 +16,5 @@ # decaffeinate-parser

* Single-line functions, `if` statements, etc. have blocks for bodies.
* Virtual nodes (such as the `LogicalNotOp` generated by an `unless`) are
marked as such with a `virtual: true` property.
* `for-in` loops do not have an implicit `step` property.
* Ranges of programs with indented blocks are correct.

@@ -18,0 +21,0 @@ * `super` is supported in classes.

@@ -44,2 +44,11 @@ import isChainedComparison from './util/isChainedComparison';

function locationWithLastPosition(loc, last) {
return {
first_line: loc.first_line,
first_column: loc.first_column,
last_line: last.last_line,
last_column: last.last_column
};
}
function mergeLocations(left, right) {

@@ -284,2 +293,3 @@ let first_line;

}
node.locationData = locationWithLastPosition(node.locationData, node.body.locationData);
if (node.object) {

@@ -286,0 +296,0 @@ return makeNode('ForOf', node.locationData, {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc