Skip to content

Commit b860e6e

Browse files
authored
Add Spellchecker (#252)
1 parent 8226ba4 commit b860e6e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+1008
-832
lines changed

.codespellrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[codespell]
2+
skip = ./node_modules*,./dist/*,./package-lock.json,./lib/srfi/*,./assets/UnicodeData.txt,./scripts/numerals.scm

.github/workflows/build.yaml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
name: Build and test
2-
on: [push, pull_request]
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- devel
8+
pull_request:
9+
branches:
10+
- master
11+
- devel
12+
313
jobs:
414
build:
515
runs-on: ubuntu-latest

.github/workflows/codespell.yaml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Codespell
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- devel
8+
pull_request:
9+
branches:
10+
- master
11+
- devel
12+
13+
permissions:
14+
contents: read
15+
16+
jobs:
17+
codespell:
18+
name: Check for spelling errors
19+
runs-on: ubuntu-latest
20+
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@v3
24+
- name: Codespell
25+
uses: codespell-project/actions-codespell@v2

ARCHITECTURE.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Main interpreter data flow.
77
Main public function is `exec` that accept string (code) and Environment instance. If environment is not specified it use main user environment (same as lips.env) which is child of global environment.
88

99
`exec` use internal `parse` function that is JavaScript generator that parse single S-Expression and `exec` use `evaluate` to evaluate the expression.
10-
`evaluate` use multiple features like handling of Syntax, Macros and it auto resolve promises. `evaluate` may or may not return a promise. But `exec` always return a promise, so it's easier to use. You can never know which expression return a promise and which don't. `evaluate` also use `apply` function that was inspired by meta circual evaluator (but it was refactored into this state, it was not like this from beginning).
10+
`evaluate` use multiple features like handling of Syntax, Macros and it auto resolve promises. `evaluate` may or may not return a promise. But `exec` always return a promise, so it's easier to use. You can never know which expression return a promise and which don't. `evaluate` also use `apply` function that was inspired by meta circular evaluator (but it was refactored into this state, it was not like this from beginning).
1111

1212
## UML Diagram of all classes
1313

@@ -16,7 +16,7 @@ Main public function is `exec` that accept string (code) and Environment instanc
1616
## Lexer
1717

1818
Lexer is created as simple state machine with `Lexer._rules` that specify
19-
all the states. The sate change is simple it can change from null to given
19+
all the states. The state change is simple it can change from null to given
2020
state for a given token (e.g. symbol), remain in same state and move from
2121
given state to null. The last change produce new token. Rules are dynamic
2222
the parser can be update by syntax extensions so `Lexer.rules` is a getter

CHANGELOG.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
* property throw error when name is used without ellipsis
5858
* fix using dot notation inside syntax-rules macros
5959
* typecheck `string->symbol` and `symbol->string`
60-
* fix `parent.frame` inside `Intepreter`
60+
* fix `parent.frame` inside `Interpreter`
6161
* fix `eval` without env
6262
* fix quote as delimiter
6363
* fix comma dot as two tokens
@@ -362,7 +362,7 @@
362362
* `if` no longer require boolean as cond
363363
* change how arrays are presented, they are look like scheme vector `#(...)`
364364
* rename `string` to `repr`
365-
* new API `lips.Intepreter` - for using interpreter that have different stdout/stdin
365+
* new API `lips.Interpreter` - for using interpreter that have different stdout/stdin
366366
* balanced_parenthesis now throw exception on broken code
367367
* remove global env from public API (you can still access it using `env.parent`)
368368
* remove `->` function (it will collide with SRFI 197 that may be implemented in the future)
@@ -395,7 +395,7 @@
395395
* improve balancing parenthesis
396396
* expose balanced method in public API (preferred name)
397397
* optional brackets
398-
* `interator?` function and detection if iterators from `repr` and `type` [#51](https://github.com/jcubic/lips/issues/51)
398+
* `iterator?` function and detection if iterators from `repr` and `type` [#51](https://github.com/jcubic/lips/issues/51)
399399
* `add-repr!` function to add string representations to objects
400400
* new `string=?`, `sort`, `in`, `list-tail` and `bound?` functions
401401
* add new `exit` function into executable interpreter
@@ -689,7 +689,7 @@
689689
### Features
690690
* new nth and reverse functions
691691
* new type checking functions null? regex? pair? string? number? symbol? array? object? boolean?
692-
* add lips source code that throwed exception in JavaScript error message
692+
* add lips source code that threw exception in JavaScript error message
693693
### Bug fixes
694694
* fix lambda with rest parameter
695695
### Breaking

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
7171

7272
--------------------------------------------------------------------------------
7373

74-
Part of the library (contentloaded function) licesed with
74+
Part of the library (contentloaded function) licensed with
7575

7676
Copyright (c) 2005-2010 Diego Perini and NWBOX S.a.s.
7777

Makefile

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
SHELL=/bin/bash
2-
31
.PHONY: publish test coveralls lint zero coverage
42

53
VERSION=1.0.0-beta.16
@@ -67,10 +65,10 @@ assets/classDiagram.svg: assets/classDiagram
6765

6866
README.md: templates/README.md dist/lips.js .$(VERSION)
6967
$(GIT) branch | grep '* devel' > /dev/null && $(SED) -e "s/{{VER}}/DEV/g" -e \
70-
"s/{{VER_DASH}}/$(VERSION_DASH)/g" -e "s/{{BRANCH}}/$(BRANCH)/g" -e "s/{{CHECKSUM}}/$(TESTS_CHECKSUM)/g" \
68+
"s/{{VER_DASH}}/$(VERSION_DASH)/g" -e "s#{{BRANCH}}#$(BRANCH)#g" -e "s/{{CHECKSUM}}/$(TESTS_CHECKSUM)/g" \
7169
-e "s/{{YEAR}}/${YEAR}/g" -e "s/{{DATE}}/${DATE_SHORT}/" -e "s/{{COMMIT}}/$(COMMIT)/g" \
7270
< templates/README.md > README.md || \
73-
$(SED) -e "s/{{VER}}/$(VERSION)/g" -e "s/{{BRANCH}}/$(BRANCH)/g" -e "s/{{YEAR}}/${YEAR}/g" \
71+
$(SED) -e "s/{{VER}}/$(VERSION)/g" -e "s#{{BRANCH}}#$(BRANCH)#g" -e "s/{{YEAR}}/${YEAR}/g" \
7472
-e "s/{{CHECKSUM}}/$(TESTS_CHECKSUM)/g" -e "s/{{COMMIT}}/$(COMMIT)/g" -e "s/{{DATE}}/${DATE_SHORT}/" \
7573
-e "s/{{VER_DASH}}/$(VERSION_DASH)/g" < templates/README.md > README.md
7674

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
[![npm](https://img.shields.io/badge/npm-1.0.0%E2%80%93beta.16-blue.svg)](https://www.npmjs.com/package/@jcubic/lips)
88
![1.0.0 Complete](https://img.shields.io/github/milestones/progress-percent/jcubic/lips/1?label=1.0.0%20Complete)
99
[![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)
10-
[![Coverage Status](https://coveralls.io/repos/github/jcubic/lips/badge.svg?branch=devel&27bf4fb65e05b7570ad966f858c29bcc)](https://coveralls.io/github/jcubic/lips?branch=devel)
10+
[![Coverage Status](https://coveralls.io/repos/github/jcubic/lips/badge.svg?branch=devel&61cb7f36a3668cabc9125f4c4bce1141)](https://coveralls.io/github/jcubic/lips?branch=devel)
1111
[![Join Gitter Chat](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/jcubic/lips)
1212
![NPM Download Count](https://img.shields.io/npm/dm/@jcubic/lips)
1313
![JSDelivr Download count](https://img.shields.io/jsdelivr/npm/hm/@jcubic/lips)
@@ -79,7 +79,7 @@ https://github.com/jcubic/lips/blob/master/lib/js/bookmark.js
7979
```
8080

8181
Create any link in your bookmarks, edit it and copy paste the content of that file.
82-
Affter you click on the link it will create the REPL at the bottom of the page.
82+
After you click on the link it will create the REPL at the bottom of the page.
8383
(NOTE: It may not work on every page because of content security policy;
8484
e.g. google.com or gihub.com)
8585

@@ -203,7 +203,7 @@ Executables also return a S-Expression according to SRFI-176 use `lips --version
203203

204204
## Limitations
205205
Because LIPS is tree walking interpreter sometimes it may be slow. Especially if you want to
206-
process long arrays and use callback function. If the array is quite large each pice of code
206+
process long arrays and use callback function. If the array is quite large each piece of code
207207
inside the callback may slow down the processing. For example see:
208208

209209
script [reference.scm](https://github.com/jcubic/lips/blob/devel/scripts/reference.scm)
@@ -222,12 +222,12 @@ something like this:
222222
(arr.sort fn))
223223
```
224224

225-
Another example of slow performace is using LIPS with React, the more code you put into components
225+
Another example of slow performance is using LIPS with React, the more code you put into components
226226
the slower the app will become.
227227

228228
Examples:
229229
* [Preact app that update SVG](https://codepen.io/jcubic/pen/PojYxBP) - it requires to use debounce.
230-
* [React with Hooks](https://codepen.io/jcubic/pen/PoKQmpq?editors=1000) - on click the UI freezes for ~300ms, you can see warnigs in dev tools.
230+
* [React with Hooks](https://codepen.io/jcubic/pen/PoKQmpq?editors=1000) - on click the UI freezes for ~300ms, you can see warnings in dev tools.
231231

232232
The issue with performance is tracked in [#197](https://github.com/jcubic/lips/issues/197).
233233

0 commit comments

Comments
 (0)