src/core.js
// import * as IDENTIFIER from "MODULE"
import * as IDENTIFIER from "MODULE"
import * as IDENTIFIER from " MODULE "
function handleImportStar() {
    LOOKING_FOR = "import name for import*";
    let identifierStart = str.indexWithin("* as ", pos + 7, DISTANCE, false);
    if (identifierStart === -1) {
      return handleDefaultImport();
    }
    identifierStart += 5;
    const identifierEnd = str.indexWithin(
      " ",
      identifierStart + 1,
      lenIdentifier
    );
    LOOKING_FOR = "name of imported module for import*";
    let moduleStart =
      str.indexWithin("from ", identifierEnd + 1) + "from".length;
    moduleStart = str.indexWithin(quote, moduleStart + 1);
    const moduleEnd = str.indexWithin(quote, moduleStart + 1, lenModuleName);
    start = moduleEnd + 1;
    return {
      type: "import*",
      start: pos,
      end: moduleEnd,
      identifier: str.slice(identifierStart, identifierEnd),
      moduleName: str.slice(moduleStart, moduleEnd + 1)
    };
  }
function handleImportStar ( ) { LOOKING_FOR = "import name for import*" ; let identifierStart = str . indexWithin ( "* as " , pos + 7 , DISTANCE , false ) ; if ( identifierStart === - 1 ) { return handleDefaultImport ( ) ; } identifierStart += 5 ; const identifierEnd = str . indexWithin ( " " , identifierStart + 1 , lenIdentifier ) ; LOOKING_FOR = "name of imported module for import*" ; let moduleStart = str . indexWithin ( "from " , identifierEnd + 1 ) + "from" . length ; moduleStart = str . indexWithin ( quote , moduleStart + 1 ) ; const moduleEnd = str . indexWithin ( quote , moduleStart + 1 , lenModuleName ) ; start = moduleEnd + 1 ; return { type : "import*" , start : pos , end : moduleEnd , identifier : str . slice ( identifierStart , identifierEnd ) , moduleName : str . slice ( moduleStart , moduleEnd + 1 ) } ; }
import * as IDENTIFIER from "MODULE"
import * as IDENTIFIER from " MODULE "
// 7 === "import ".length, 5 === "* as ".length