Skip to content

Commit

Permalink
fix unquote-splicing inside direct quasiquoted vector #140
Browse files Browse the repository at this point in the history
  • Loading branch information
jcubic committed Mar 11, 2021
1 parent 0f4b4fb commit 944ac7c
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 10 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@
* fix `list-ref` according to R7RS errata
* fix formatter (pretty print) on multiline strings and atoms
* fix repr of vectors (arrays with empty value)
* fix promise quotation of object macro call [#139](https://github.com/jcubic/lips/issues/139)
* fix unquote-splicing inside direct quasiquote vector [#140](https://github.com/jcubic/lips/issues/140)

## 1.0.0-beta.11
### Breaking
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

[![npm](https://img.shields.io/badge/npm-1.0.0%E2%80%93beta.11-blue.svg)](https://www.npmjs.com/package/@jcubic/lips)
![1.0.0 Complete](https://img.shields.io/github/milestones/progress-percent/jcubic/lips/1?label=1.0.0%20Complete)
[![travis](https://travis-ci.org/jcubic/lips.svg?branch=devel&63ac4d67dfe81e769f47c695f7b9a710708fccbb)](https://travis-ci.org/jcubic/lips)
[![Coverage Status](https://coveralls.io/repos/github/jcubic/lips/badge.svg?branch=devel&551e169e95ac4e85793d6a5b88285ff2)](https://coveralls.io/github/jcubic/lips?branch=devel)
[![travis](https://travis-ci.org/jcubic/lips.svg?branch=devel&0f4b4fbf0f85952588e34f3dee8104e3d7bf870c)](https://travis-ci.org/jcubic/lips)
[![Coverage Status](https://coveralls.io/repos/github/jcubic/lips/badge.svg?branch=devel&3e55368afee82ab19fc6dffd19f894db)](https://coveralls.io/github/jcubic/lips?branch=devel)
[![Join Gitter Chat](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/jcubic/lips)
[![GitHub license](https://img.shields.io/github/license/jcubic/lips.svg)](https://github.com/jcubic/lips/blob/master/LICENSE)
[![GitHub stars](https://img.shields.io/github/stars/jcubic/lips.svg?style=social&label=Star&maxAge=2592000)](https://github.com/jcubic/lips/stargazers/)
Expand Down
10 changes: 5 additions & 5 deletions dist/lips.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
* Copyright (c) 2014-present, Facebook, Inc.
* released under MIT license
*
* build: Thu, 11 Mar 2021 21:22:59 +0000
* build: Thu, 11 Mar 2021 21:38:59 +0000
*/
(function () {
'use strict';
Expand Down Expand Up @@ -11251,7 +11251,7 @@

function unquoted_arr(arr) {
return !!arr.filter(function (value) {
return value instanceof Pair && LSymbol.is(value.car, 'unquote');
return value instanceof Pair && LSymbol.is(value.car, /^(unquote|unquote-splicing)$/);
}).length;
} // -----------------------------------------------------------------

Expand Down Expand Up @@ -13734,10 +13734,10 @@

var banner = function () {
// Rollup tree-shaking is removing the variable if it's normal string because
// obviously 'Thu, 11 Mar 2021 21:22:59 +0000' == '{{' + 'DATE}}'; can be removed
// obviously 'Thu, 11 Mar 2021 21:38:59 +0000' == '{{' + 'DATE}}'; can be removed
// but disablig Tree-shaking is adding lot of not used code so we use this
// hack instead
var date = LString('Thu, 11 Mar 2021 21:22:59 +0000').valueOf();
var date = LString('Thu, 11 Mar 2021 21:38:59 +0000').valueOf();

var _date = date === '{{' + 'DATE}}' ? new Date() : new Date(date);

Expand Down Expand Up @@ -13777,7 +13777,7 @@
var lips = {
version: 'DEV',
banner: banner,
date: 'Thu, 11 Mar 2021 21:22:59 +0000',
date: 'Thu, 11 Mar 2021 21:38:59 +0000',
exec: exec,
// unwrap async generator into Promise<Array>
parse: compose(uniterate_async, parse),
Expand Down
4 changes: 2 additions & 2 deletions dist/lips.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/lips.js
Original file line number Diff line number Diff line change
Expand Up @@ -7481,7 +7481,7 @@
function unquoted_arr(arr) {
return !!arr.filter(value => {
return value instanceof Pair &&
LSymbol.is(value.car, 'unquote');
LSymbol.is(value.car, /^(unquote|unquote-splicing)$/);
}).length;
}
// -----------------------------------------------------------------
Expand Down

0 comments on commit 944ac7c

Please sign in to comment.