Skip to content

Commit

Permalink
make do macro work only with false value #87
Browse files Browse the repository at this point in the history
  • Loading branch information
jcubic committed Nov 23, 2020
1 parent af28c02 commit 4488480
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 17 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
![LIPS - Scheme Based Powerful Lisp Language](https://github.com/jcubic/lips/blob/devel/assets/lips.svg?raw=true)

[![npm](https://img.shields.io/badge/npm-1.0.0%E2%80%93beta.9-blue.svg)](https://www.npmjs.com/package/@jcubic/lips)
[![travis](https://travis-ci.org/jcubic/lips.svg?branch=devel&129525f6236e24fc16e84aa4d7801f8b0f033039)](https://travis-ci.org/jcubic/lips)
[![travis](https://travis-ci.org/jcubic/lips.svg?branch=devel&af28c02e25c8ae80ff2145ea55a506aa0266b190)](https://travis-ci.org/jcubic/lips)
[![Coverage Status](https://coveralls.io/repos/github/jcubic/lips/badge.svg?branch=devel&f6ff9bc2f84ef7b55e3e590fe6bc423b)](https://coveralls.io/github/jcubic/lips?branch=devel)
[![Join Gitter Chat](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/jcubic/lips)
<a href="https://twitter.com/intent/tweet?text=Powerful%20Scheme%20based%20lisp%20language%20written%20in%20JavaScript.%20It%20makes%20life%20easier%20by%20better%20interaction%20with%20JS.%20Use%20full%20power%20of%20JavaScript%2C%20lisp%20and%20npm%20to%20create%20your%20applications%20via%20@jcubic&url=https://github.com/jcubic/lips&hashtags=javascript,opensource,lisp,scheme,language,programming">
Expand Down
28 changes: 15 additions & 13 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: Mon, 23 Nov 2020 11:50:58 +0000
* build: Mon, 23 Nov 2020 12:02:30 +0000
*/
(function () {
'use strict';
Expand Down Expand Up @@ -8928,30 +8928,32 @@
return evaluate(test.car, eval_args);

case 25:
if (_context9.sent) {
_context9.next = 29;
_context9.t3 = _context9.sent;

if (!(_context9.t3 !== false)) {
_context9.next = 30;
break;
}

return _context9.delegateYield(_loop3(), "t3", 27);
return _context9.delegateYield(_loop3(), "t4", 28);

case 27:
case 28:
_context9.next = 23;
break;

case 29:
case 30:
if (!(test.cdr !== nil)) {
_context9.next = 33;
_context9.next = 34;
break;
}

_context9.next = 32;
_context9.next = 33;
return evaluate(test.cdr.car, eval_args);

case 32:
case 33:
return _context9.abrupt("return", _context9.sent);

case 33:
case 34:
case "end":
return _context9.stop();
}
Expand Down Expand Up @@ -11748,10 +11750,10 @@

var banner = function () {
// Rollup tree-shaking is removing the variable if it's normal string because
// obviously 'Mon, 23 Nov 2020 11:50:58 +0000' == '{{' + 'DATE}}'; can be removed
// obviously 'Mon, 23 Nov 2020 12:02:30 +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('Mon, 23 Nov 2020 11:50:58 +0000').valueOf();
var date = LString('Mon, 23 Nov 2020 12:02:30 +0000').valueOf();

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

Expand Down Expand Up @@ -11788,7 +11790,7 @@
var lips = {
version: 'DEV',
banner: banner,
date: 'Mon, 23 Nov 2020 11:50:58 +0000',
date: 'Mon, 23 Nov 2020 12:02:30 +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 @@ -5763,7 +5763,7 @@
node = node.cdr;
}
eval_args = { env: scope, dynamic_scope, error };
while (!(await evaluate(test.car, eval_args))) {
while ((await evaluate(test.car, eval_args)) !== false) {
if (body !== nil) {
await lips.evaluate(body, eval_args);
}
Expand Down

0 comments on commit 4488480

Please sign in to comment.