fluent-syntax
Advanced tools
Comparing version 0.6.5 to 0.6.6
# Changelog | ||
## fluent-syntax 0.6.6 (March 19, 2018) | ||
- `Function` AST nodes have a span now. (#167) | ||
## fluent-syntax 0.6.5 (March 8, 2018) | ||
@@ -4,0 +9,0 @@ |
@@ -1,2 +0,2 @@ | ||
/* fluent-syntax@0.6.5 */ | ||
/* fluent-syntax@0.6.6 */ | ||
(function (global, factory) { | ||
@@ -32,2 +32,10 @@ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : | ||
var inherits = function (subClass, superClass) { | ||
@@ -49,2 +57,12 @@ if (typeof superClass !== "function" && superClass !== null) { | ||
var possibleConstructorReturn = function (self, call) { | ||
@@ -58,2 +76,6 @@ if (!self) { | ||
var slicedToArray = function () { | ||
@@ -1932,3 +1954,8 @@ function sliceIterator(arr, i) { | ||
return new CallExpression(new Function$1(literal.id.name), args); | ||
var func = new Function$1(literal.id.name); | ||
if (this.withSpans) { | ||
func.addSpan(literal.span.start, literal.span.end); | ||
} | ||
return new CallExpression(func, args); | ||
} | ||
@@ -2160,3 +2187,2 @@ | ||
function serializeComment(comment) { | ||
@@ -2163,0 +2189,0 @@ return comment.content.split("\n").map(function (line) { |
@@ -1,2 +0,2 @@ | ||
/* fluent-syntax@0.6.5 */ | ||
/* fluent-syntax@0.6.6 */ | ||
(function (global, factory) { | ||
@@ -827,3 +827,2 @@ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : | ||
function withSpan(fn) { | ||
@@ -1457,4 +1456,9 @@ return function(ps, ...args) { | ||
const func = new Function(literal.id.name); | ||
if (this.withSpans) { | ||
func.addSpan(literal.span.start, literal.span.end); | ||
} | ||
return new CallExpression( | ||
new Function(literal.id.name), | ||
func, | ||
args | ||
@@ -1461,0 +1465,0 @@ ); |
{ | ||
"name": "fluent-syntax", | ||
"description": "AST and parser for Fluent", | ||
"version": "0.6.5", | ||
"version": "0.6.6", | ||
"homepage": "http://projectfluent.org", | ||
@@ -6,0 +6,0 @@ "author": "Mozilla <l10n-drivers@mozilla.org>", |
@@ -636,4 +636,9 @@ /* eslint no-magic-numbers: [0] */ | ||
const func = new AST.Function(literal.id.name); | ||
if (this.withSpans) { | ||
func.addSpan(literal.span.start, literal.span.end); | ||
} | ||
return new AST.CallExpression( | ||
new AST.Function(literal.id.name), | ||
func, | ||
args | ||
@@ -640,0 +645,0 @@ ); |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
149689
5148
1