You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
742 B
19 lines
742 B
1 month ago
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _keywords = require('../parser/tokenizer/keywords');
|
||
|
var _types = require('../parser/tokenizer/types');
|
||
|
|
||
|
|
||
|
/**
|
||
|
* Starting at `export {`, look ahead and return `true` if this is an
|
||
|
* `export {...} from` statement and `false` if this is a plain multi-export.
|
||
|
*/
|
||
|
function isExportFrom(tokens) {
|
||
|
let closeBraceIndex = tokens.currentIndex();
|
||
|
while (!tokens.matches1AtIndex(closeBraceIndex, _types.TokenType.braceR)) {
|
||
|
closeBraceIndex++;
|
||
|
}
|
||
|
return (
|
||
|
tokens.matchesContextualAtIndex(closeBraceIndex + 1, _keywords.ContextualKeyword._from) &&
|
||
|
tokens.matches1AtIndex(closeBraceIndex + 2, _types.TokenType.string)
|
||
|
);
|
||
|
} exports.default = isExportFrom;
|