|
Last change
on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 2 weeks ago |
|
Fix frontend appearance
|
-
Property mode
set to
100644
|
|
File size:
742 bytes
|
| Rev | Line | |
|---|
| [9af201e] | 1 | "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _keywords = require('../parser/tokenizer/keywords');
|
|---|
| 2 | var _types = require('../parser/tokenizer/types');
|
|---|
| 3 |
|
|---|
| 4 |
|
|---|
| 5 | /**
|
|---|
| 6 | * Starting at `export {`, look ahead and return `true` if this is an
|
|---|
| 7 | * `export {...} from` statement and `false` if this is a plain multi-export.
|
|---|
| 8 | */
|
|---|
| 9 | function isExportFrom(tokens) {
|
|---|
| 10 | let closeBraceIndex = tokens.currentIndex();
|
|---|
| 11 | while (!tokens.matches1AtIndex(closeBraceIndex, _types.TokenType.braceR)) {
|
|---|
| 12 | closeBraceIndex++;
|
|---|
| 13 | }
|
|---|
| 14 | return (
|
|---|
| 15 | tokens.matchesContextualAtIndex(closeBraceIndex + 1, _keywords.ContextualKeyword._from) &&
|
|---|
| 16 | tokens.matches1AtIndex(closeBraceIndex + 2, _types.TokenType.string)
|
|---|
| 17 | );
|
|---|
| 18 | } exports.default = isExportFrom;
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.