Skip to content

Commit

Permalink
fix formatting syntax-rules
Browse files Browse the repository at this point in the history
  • Loading branch information
jcubic committed Feb 10, 2024
1 parent 70236b5 commit 233cf7b
Show file tree
Hide file tree
Showing 8 changed files with 31 additions and 28 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
* fix syntax-rules macro that manipulate code (see tests/syntax.scm and undswap macro)
* fix `(read)` in the Web REPL
* fix Node REPL with `npm install` [#305](https://github.com/jcubic/lips/issues/305)
* fix formatting `syntax-rules`

## 1.0.0-beta.18
### Breaking
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
[![npm](https://img.shields.io/badge/npm-1.0.0%E2%80%93beta.18.1-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)
[![Build and test](https://github.com/jcubic/lips/actions/workflows/build.yaml/badge.svg?branch=devel&event=push)](https://github.com/jcubic/lips/actions/workflows/build.yaml)
[![Coverage Status](https://coveralls.io/repos/github/jcubic/lips/badge.svg?branch=devel&34b88072398616a481aa4881458faee7)](https://coveralls.io/github/jcubic/lips?branch=devel)
[![Coverage Status](https://coveralls.io/repos/github/jcubic/lips/badge.svg?branch=devel&5dee32a131ab77e7b275ff9e2d31107c)](https://coveralls.io/github/jcubic/lips?branch=devel)
[![Join Gitter Chat](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/jcubic/lips)
![NPM Download Count](https://img.shields.io/npm/dm/@jcubic/lips)
![JSDelivr Download count](https://img.shields.io/jsdelivr/npm/hm/@jcubic/lips)
Expand Down
13 changes: 6 additions & 7 deletions dist/lips.cjs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 6 additions & 7 deletions dist/lips.esm.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions dist/lips.esm.min.js

Large diffs are not rendered by default.

13 changes: 6 additions & 7 deletions dist/lips.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions dist/lips.min.js

Large diffs are not rendered by default.

7 changes: 6 additions & 1 deletion src/lips.js
Original file line number Diff line number Diff line change
Expand Up @@ -2215,6 +2215,7 @@ const symbol = new Pattern([Symbol.for('symbol')], '?');
const symbols = new Pattern([Symbol.for('symbol')], '*');
const identifiers = [p_o, symbols, p_e];
const let_value = new Pattern([p_o, Symbol.for('symbol'), glob, p_e], '+');
const syntax_rules = keywords_re('syntax-rules');
// rules for breaking S-Expressions into lines
var def_lambda_re = keywords_re('define', 'lambda', 'define-macro', 'syntax-rules');
/* eslint-disable max-len */
Expand All @@ -2232,7 +2233,11 @@ Formatter.rules = [
[[p_o, let_re, symbol, p_o, let_value, p_e], 1],
[[p_o, let_re, symbol, sexp_or_atom], 1, not_close],
[[p_o, let_re, p_o, let_value], 1, not_close],
//--[[p_o, keywords_re('define-syntax'), /.+/], 1],
[[p_o, keywords_re('define-syntax'), /.+/], 1],
[[p_o, syntax_rules, not_p, identifiers], 1],
[[p_o, syntax_rules, not_p, identifiers, sexp], 1, not_close],
[[p_o, syntax_rules, identifiers], 1],
[[p_o, syntax_rules, identifiers, sexp], 1, not_close],
[[p_o, non_def, new Pattern([/[^()[\]]/], '+'), sexp], 1, not_close],
[[p_o, sexp], 1, not_close],
[[p_o, not_p, sexp], 1, not_close],
Expand Down

0 comments on commit 233cf7b

Please sign in to comment.