pacc 9.2.2 → 9.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/parser.mjs +2 -5
package/package.json
CHANGED
package/src/parser.mjs
CHANGED
|
@@ -3,7 +3,7 @@ import { tokens, EOF } from "./tokens.mjs";
|
|
|
3
3
|
export function parseOnly(input, context = {}) {
|
|
4
4
|
input = tokens(input, context);
|
|
5
5
|
|
|
6
|
-
let
|
|
6
|
+
let token, value;
|
|
7
7
|
|
|
8
8
|
function advance() {
|
|
9
9
|
const next = input.next();
|
|
@@ -18,9 +18,6 @@ export function parseOnly(input, context = {}) {
|
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
const parser = {
|
|
21
|
-
get node() {
|
|
22
|
-
return node;
|
|
23
|
-
},
|
|
24
21
|
get token() {
|
|
25
22
|
return token;
|
|
26
23
|
},
|
|
@@ -40,7 +37,7 @@ export function parseOnly(input, context = {}) {
|
|
|
40
37
|
expression(precedence) {
|
|
41
38
|
const last = token;
|
|
42
39
|
advance();
|
|
43
|
-
node = last.nud(parser);
|
|
40
|
+
let node = last.nud(parser);
|
|
44
41
|
|
|
45
42
|
while (token.precedence > precedence) {
|
|
46
43
|
const last = token;
|