Skip to content

Commit

Permalink
version 0.6.16
Browse files Browse the repository at this point in the history
  • Loading branch information
gcanti committed Nov 10, 2021
1 parent 091363a commit 486dc35
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 2 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@
**Note**: Gaps between patch versions are faulty/broken releases. **Note**: A feature tagged as Experimental is in a
high state of flux, you're at risk of it changing without notice.

# 0.6.16

- **New Feature**
- add `unicodeLetter` combinator, #52 (@frysztak)

# 0.6.15

- **Bug Fix**
Expand Down
15 changes: 15 additions & 0 deletions docs/modules/char.ts.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ Added in v0.6.0
- [notSpace](#notspace)
- [notUpper](#notupper)
- [space](#space)
- [unicodeLetter](#unicodeletter)
- [upper](#upper)
- [constructors](#constructors)
- [char](#char)
Expand Down Expand Up @@ -186,6 +187,20 @@ export declare const space: P.Parser<string, string>
Added in v0.6.0
## unicodeLetter
Matches a single Unicode letter.
Works for scripts which have a notion of an upper case and lower case letters
(Latin-based scripts, Greek, Russian etc).
**Signature**
```ts
export declare const unicodeLetter: P.Parser<string, string>
```
Added in v0.6.16
## upper
Matches a single upper case ASCII letter.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "parser-ts",
"version": "0.6.15",
"version": "0.6.16",
"description": "String parser combinators for TypeScript",
"main": "lib/index.js",
"module": "es6/index.js",
Expand Down
1 change: 1 addition & 0 deletions src/char.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ const isUnicodeLetter: (c: Char) => boolean = c => c.toLowerCase() !== c.toUpper
* (Latin-based scripts, Greek, Russian etc).
*
* @category combinators
* @since 0.6.16
*/
export const unicodeLetter = P.expected(P.sat(isUnicodeLetter), 'an unicode letter')

Expand Down
2 changes: 1 addition & 1 deletion test/char.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ describe('char', () => {
assert.deepStrictEqual(S.run('@')(parser), error(stream(['@']), ['a letter']))
})

it('unicode letter', () => {
it('unicode letter', () => {
const parser = C.unicodeLetter
assert.deepStrictEqual(S.run('a')(parser), success('a', stream(['a'], 1), stream(['a'])))
assert.deepStrictEqual(S.run('ą')(parser), success('ą', stream(['ą'], 1), stream(['ą'])))
Expand Down

0 comments on commit 486dc35

Please sign in to comment.