pacc 4.7.1 → 4.7.2
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/tokens.mjs +5 -1
package/package.json
CHANGED
package/src/tokens.mjs
CHANGED
|
@@ -97,7 +97,7 @@ export function* tokens(string) {
|
|
|
97
97
|
case "number":
|
|
98
98
|
case "identifier":
|
|
99
99
|
yield value;
|
|
100
|
-
value =
|
|
100
|
+
value = undefined;
|
|
101
101
|
state = undefined;
|
|
102
102
|
break;
|
|
103
103
|
default:
|
|
@@ -245,6 +245,10 @@ export function* tokens(string) {
|
|
|
245
245
|
value = c.charCodeAt(0) - 48;
|
|
246
246
|
state = "number";
|
|
247
247
|
break;
|
|
248
|
+
case '.':
|
|
249
|
+
state = "number-fraction";
|
|
250
|
+
value = 0;
|
|
251
|
+
divider = 10;
|
|
248
252
|
case "number-fraction":
|
|
249
253
|
value = value + (c.charCodeAt(0) - 48) / divider;
|
|
250
254
|
divider *= 10;
|