Giter Site home page Giter Site logo

acorn-import-attributes's Introduction

acorn-import-attributes

Demonstration repo for testing import attributes support in acorn.

Setup

  1. Have Node installed (you can run nvm use if you have nvm installed)
  2. Run npm ci

Demo

To run the demo, run npm run demo.

This demo simply reads a file that contains usage of Import Attributes. Currently, this error is shown.

    โžœ  acorn-import-attributes git:(master) โœ— npm run demo
> [email protected] demo
> node index.js

{
  source: "import data from './data.json' with { type: 'json '};\n" +
    '\n' +
    "// console.log('hello world!');"
}
file:///Users/owenbuckley/Workspace/github/acorn-import-attributes/node_modules/acorn/dist/acorn.mjs:3567
  var err = new SyntaxError(message);
            ^

SyntaxError: Unexpected token (1:31)
    at pp$4.raise (file:///Users/owenbuckley/Workspace/github/acorn-import-attributes/node_modules/acorn/dist/acorn.mjs:3567:13)
    at pp$9.unexpected (file:///Users/owenbuckley/Workspace/github/acorn-import-attributes/node_modules/acorn/dist/acorn.mjs:766:8)
    at pp$9.semicolon (file:///Users/owenbuckley/Workspace/github/acorn-import-attributes/node_modules/acorn/dist/acorn.mjs:743:66)
    at pp$8.parseImport (file:///Users/owenbuckley/Workspace/github/acorn-import-attributes/node_modules/acorn/dist/acorn.mjs:1839:8)
    at pp$8.parseStatement (file:///Users/owenbuckley/Workspace/github/acorn-import-attributes/node_modules/acorn/dist/acorn.mjs:942:49)
    at pp$8.parseTopLevel (file:///Users/owenbuckley/Workspace/github/acorn-import-attributes/node_modules/acorn/dist/acorn.mjs:823:21)
    at Parser.parse (file:///Users/owenbuckley/Workspace/github/acorn-import-attributes/node_modules/acorn/dist/acorn.mjs:595:15)
    at Function.parse (file:///Users/owenbuckley/Workspace/github/acorn-import-attributes/node_modules/acorn/dist/acorn.mjs:645:35)
    at Module.parse (file:///Users/owenbuckley/Workspace/github/acorn-import-attributes/node_modules/acorn/dist/acorn.mjs:5955:17)
    at file:///Users/owenbuckley/Workspace/github/acorn-import-attributes/index.js:8:19 {
  pos: 31,
  loc: Position { line: 1, column: 31 },
  raisedAt: 35
}

Node.js v18.12.1

acorn-import-attributes's People

Contributors

thescientist13 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.