# All files / src/parser export.js

100% Statements 6/6
100% Branches 0/0
100% Functions 1/1
100% Lines 6/6

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    26x
    26x

    119x
    119x

    119x

    119x

     // @flow
    import Syntax from "../Syntax";
    import maybeFunctionDeclaration from "./maybe-function-declaration";
    import type { NodeType } from "../flow/types";
    import type Context from "./context";

    export default function parseExport(ctx: Context): NodeType {
      const node = ctx.startNode();
      ctx.eat(["export"]);

      const params = [maybeFunctionDeclaration(ctx)];

      return ctx.endNode({ ...node, params }, Syntax.Export);
    }