functionalscript 0.0.524 → 0.0.525

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.
@@ -106,7 +106,7 @@ const {
106
106
  * {readonly kind: '=' | '+=' | '-=' | '*=' | '/=' | '%=' | '**='} |
107
107
  * {readonly kind: '&' | '|' | '^' | '~' | '<<' | '>>' | '>>>' } |
108
108
  * {readonly kind: '&=' | '|=' | '^=' | '<<=' | '>>=' | '>>>='} |
109
- * {readonly kind: '&&' | '||' | '!' } |
109
+ * {readonly kind: '&&' | '||' | '!' | '??' } |
110
110
  * {readonly kind: '&&=' | '||=' | '??=' } |
111
111
  * {readonly kind: '?' | '?.' | '.' | '=>'}
112
112
  * } OperatorToken
@@ -393,7 +393,7 @@ const operatorDfa = {
393
393
  '>>>=': {token: {kind: '>>>='}, transitions: []},
394
394
  '?' : { token: { kind: '?' }, transitions: [fullStop, questionMark]},
395
395
  '?.' : { token: { kind: '?.' }, transitions: []},
396
- '??' : { token: { kind: 'error', message: 'invalid token' }, transitions: [equalsSign]},
396
+ '??' : { token: { kind: '??' }, transitions: [equalsSign]},
397
397
  '??=' : { token: { kind: '??=' }, transitions: []},
398
398
  '^' : { token: { kind: '^' }, transitions: [equalsSign]},
399
399
  '^=' : { token: { kind: '^=' }, transitions: []},
@@ -339,12 +339,12 @@ module.exports = {
339
339
  if (result !== '[{"kind":"&="},{"kind":"|="},{"kind":"^="},{"kind":"<<="},{"kind":">>="},{"kind":">>>="}]') { throw result }
340
340
  },
341
341
  () => {
342
- const result = stringify(tokenizeString('&& || !'))
343
- if (result !== '[{"kind":"&&"},{"kind":"||"},{"kind":"!"}]') { throw result }
342
+ const result = stringify(tokenizeString('&& || ! ??'))
343
+ if (result !== '[{"kind":"&&"},{"kind":"||"},{"kind":"!"},{"kind":"??"}]') { throw result }
344
344
  },
345
345
  () => {
346
- const result = stringify(tokenizeString('&&= ||= ?? ??='))
347
- if (result !== '[{"kind":"&&="},{"kind":"||="},{"kind":"error","message":"invalid token"},{"kind":"??="}]') { throw result }
346
+ const result = stringify(tokenizeString('&&= ||= ??='))
347
+ if (result !== '[{"kind":"&&="},{"kind":"||="},{"kind":"??="}]') { throw result }
348
348
  },
349
349
  () => {
350
350
  const result = stringify(tokenizeString('? ?. . =>'))
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "functionalscript",
3
- "version": "0.0.524",
3
+ "version": "0.0.525",
4
4
  "description": "FunctionalScript is a functional subset of JavaScript",
5
5
  "main": "module.f.cjs",
6
6
  "scripts": {