Skip to content

Commit

Permalink
Version bump
Browse files Browse the repository at this point in the history
  • Loading branch information
barsdeveloper committed Jan 23, 2024
1 parent d506e9d commit 674093c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
5 changes: 4 additions & 1 deletion dist/parsernostrum.js
Original file line number Diff line number Diff line change
Expand Up @@ -700,7 +700,10 @@ class MapParser extends Parser {
let result = this.#parser.toString(context, indent, childrenPath);
if (this.#parser instanceof RegExpParser) {
if (Object.values(RegExpParser.commonParser).includes(this.#parser.regexp)) {
if (this.#parser.regexp === RegExpParser.commonParser.numberInteger && this.#mapper === BigInt) {
if (
this.#parser.regexp === RegExpParser.commonParser.numberInteger
&& this.#mapper === /** @type {(v: any) => BigInt} */(BigInt)
) {
return "P.numberBigInteger"
}
return result
Expand Down
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
{
"name": "parsernostrum",
"type": "module",
"version": "1.1.0",
"version": "1.1.1",
"description": "A tiny LL parser combinator library for javascript",
"main": "src/Parsernostrum.js",
"types": "src/types.js",
"scripts": {
"build": "rollup --config",
"test": "npx playwright test",
"playwright": "npx playwright test --ui --debug",
"publish": "npm publish --access public"
"playwright": "npx playwright test --ui --debug"
},
"repository": {
"type": "git",
Expand Down
5 changes: 4 additions & 1 deletion src/parser/MapParser.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,10 @@ export default class MapParser extends Parser {
let result = this.#parser.toString(context, indent, childrenPath)
if (this.#parser instanceof RegExpParser) {
if (Object.values(RegExpParser.commonParser).includes(this.#parser.regexp)) {
if (this.#parser.regexp === RegExpParser.commonParser.numberInteger && this.#mapper === BigInt) {
if (
this.#parser.regexp === RegExpParser.commonParser.numberInteger
&& this.#mapper === /** @type {(v: any) => BigInt} */(BigInt)
) {
return "P.numberBigInteger"
}
return result
Expand Down

0 comments on commit 674093c

Please sign in to comment.