Skip to content

Commit a558826

Browse files
committed
- bugfix - Fix optional dynamic-property/function-call not recognized.
1 parent d2f4f74 commit a558826

File tree

5 files changed

+21
-9
lines changed

5 files changed

+21
-9
lines changed

.ci.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,7 @@ import moduleFs from "fs";
441441
"type": "git",
442442
"url": "https://github.com/jslint-org/jslint.git"
443443
},
444-
"version": "2024.10.1"
444+
"version": "2024.11.1"
445445
}, undefined, 4)
446446
}
447447
].map(async function ({

CHANGELOG.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
- jslint - add new warning requiring paren around plus-separated concatenations.
88
- jslint - try to improve parser to be able to parse jquery.js without stopping.
99

10-
# v2024.10.1
10+
# v2024.11.1-beta
11+
- bugfix - Fix optional dynamic-property/function-call not recognized.
1112
- ci - Update shell-function shHttpFileServer() to auto-serve /index.html, when url-path is root /.
1213

1314
# v2024.6.28

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Douglas Crockford <[email protected]>
33

44

55
# Status
6-
| Branch | [master<br>(v2024.10.1)](https://github.com/jslint-org/jslint/tree/master) | [beta<br>(Web Demo)](https://github.com/jslint-org/jslint/tree/beta) | [alpha<br>(Development)](https://github.com/jslint-org/jslint/tree/alpha) |
6+
| Branch | [master<br>(v2024.6.28)](https://github.com/jslint-org/jslint/tree/master) | [beta<br>(Web Demo)](https://github.com/jslint-org/jslint/tree/beta) | [alpha<br>(Development)](https://github.com/jslint-org/jslint/tree/alpha) |
77
|--:|:--:|:--:|:--:|
88
| CI | [![ci](https://github.com/jslint-org/jslint/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/jslint-org/jslint/actions?query=branch%3Amaster) | [![ci](https://github.com/jslint-org/jslint/actions/workflows/ci.yml/badge.svg?branch=beta)](https://github.com/jslint-org/jslint/actions?query=branch%3Abeta) | [![ci](https://github.com/jslint-org/jslint/actions/workflows/ci.yml/badge.svg?branch=alpha)](https://github.com/jslint-org/jslint/actions?query=branch%3Aalpha) |
99
| Coverage | [![coverage](https://jslint-org.github.io/jslint/branch-master/.artifact/coverage/coverage_badge.svg)](https://jslint-org.github.io/jslint/branch-master/.artifact/coverage/index.html) | [![coverage](https://jslint-org.github.io/jslint/branch-beta/.artifact/coverage/coverage_badge.svg)](https://jslint-org.github.io/jslint/branch-beta/.artifact/coverage/index.html) | [![coverage](https://jslint-org.github.io/jslint/branch-alpha/.artifact/coverage/coverage_badge.svg)](https://jslint-org.github.io/jslint/branch-alpha/.artifact/coverage/index.html) |
@@ -923,7 +923,7 @@ eval("1"); //jslint-ignore-line
923923
- `git push upstream alpha -f`
924924
- verify ci-success for upstream-branch-alpha
925925
- https://github.com/jslint-org/jslint/actions
926-
- goto https://github.com/jslint-org/jslint/compare/beta...kaizhu256:jslint:branch-p2024.6.23
926+
- goto https://github.com/jslint-org/jslint/compare/beta...kaizhu256:jslint:branch-p2024.11.9
927927
- click `Create pull request`
928928
- input `Add your description here...` with:
929929
```
@@ -932,7 +932,7 @@ Fixes #xxx.
932932
933933
This PR will ...
934934
935-
this PR will additionally:
935+
This PR will additionally:
936936
- <secondary-commit-message>
937937
...
938938

jslint.mjs

+14-3
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ let jslint_charset_ascii = (
163163
+ "@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_"
164164
+ "`abcdefghijklmnopqrstuvwxyz{|}~\u007f"
165165
);
166-
let jslint_edition = "v2024.10.1";
166+
let jslint_edition = "v2024.11.1-beta";
167167
let jslint_export; // The jslint object to be exported.
168168
let jslint_fudge = 1; // Fudge starting line and starting
169169
// ... column to 1.
@@ -4698,8 +4698,7 @@ function jslint_phase3_parse(state) {
46984698

46994699
function infix_option_chain(left) {
47004700
const the_token = token_now;
4701-
let name;
4702-
name = token_nxt;
4701+
let name = token_nxt;
47034702
if (
47044703
(
47054704
left.id !== "(string)"
@@ -4733,6 +4732,18 @@ function jslint_phase3_parse(state) {
47334732

47344733
check_left(left, the_token);
47354734
}
4735+
4736+
// Issue #468 - Fix optional dynamic-property/function-call not recognized.
4737+
4738+
if (name.id === "[" || name.id === "(") {
4739+
test_cause("dyn_prop_or_call");
4740+
4741+
// test_cause:
4742+
// ["aa?.(bb)", "infix_option_chain", "dyn_prop_or_call", "", 0]
4743+
// ["aa?.[bb]", "infix_option_chain", "dyn_prop_or_call", "", 0]
4744+
4745+
return left;
4746+
}
47364747
if (!name.identifier) {
47374748

47384749
// test_cause:

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,5 +35,5 @@
3535
"shCiArtifactUpload": 1,
3636
"shCiPublishNpm": 1,
3737
"type": "module",
38-
"version": "2024.10.1"
38+
"version": "2024.11.1-beta"
3939
}

0 commit comments

Comments
 (0)