Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DJS. JSON extensions #77

Open
11 of 16 tasks
sergey-shandar opened this issue Jan 17, 2024 · 0 comments
Open
11 of 16 tasks

DJS. JSON extensions #77

sergey-shandar opened this issue Jan 17, 2024 · 0 comments

Comments

@sergey-shandar
Copy link
Contributor

sergey-shandar commented Jan 17, 2024

  • trailing comma in objects
    { "a": "35", }
  • support for one-line comments
  • support for multiline comments
  • support for export default and module.exports =
    // data.d.mjs
    export default ...
    // data.d.cjs
    module.exports = ...
  • support for identifiers in an object
    { a: false }
  • support for const
    const a = { a: false }
    export default [a, a]
  • support for BigInt 123n
  • support for exporting a module
    // b.d.mjs
    import a from 'a.d.mjs'
    // a.d.cjs
    const a = require('a.d.cjs')
  • asynchronous parser (state)
  • a parser should return a type of the file:
    • .json, JSON
    • .d.mjs, data ES module
    • .d.cjs, data CommonJs module
  • add new line token #97

FunctionsScript

  • support for expressions
  • support for functions
  • a parser may return these additional types of the file:
    • .f.mjs, FunctionalScript ES module
    • .f.cjs, FunctionalScript CommonJS module
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant