"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.functionFlags = functionFlags;
exports.BIND_TS_NAMESPACE = exports.BIND_TS_CONST_ENUM = exports.BIND_OUTSIDE = exports.BIND_NONE = exports.BIND_TS_AMBIENT = exports.BIND_TS_ENUM = exports.BIND_TS_TYPE = exports.BIND_TS_INTERFACE = exports.BIND_FUNCTION = exports.BIND_VAR = exports.BIND_LEXICAL = exports.BIND_CLASS = exports.BIND_FLAGS_TS_EXPORT_ONLY = exports.BIND_FLAGS_TS_CONST_ENUM = exports.BIND_FLAGS_TS_ENUM = exports.BIND_FLAGS_CLASS = exports.BIND_FLAGS_NONE = exports.BIND_SCOPE_OUTSIDE = exports.BIND_SCOPE_FUNCTION = exports.BIND_SCOPE_LEXICAL = exports.BIND_SCOPE_VAR = exports.BIND_KIND_TYPE = exports.BIND_KIND_VALUE = exports.SCOPE_VAR = exports.SCOPE_TS_MODULE = exports.SCOPE_CLASS = exports.SCOPE_DIRECT_SUPER = exports.SCOPE_SUPER = exports.SCOPE_SIMPLE_CATCH = exports.SCOPE_ARROW = exports.SCOPE_GENERATOR = exports.SCOPE_ASYNC = exports.SCOPE_FUNCTION = exports.SCOPE_PROGRAM = exports.SCOPE_OTHER = void 0;
const SCOPE_OTHER = 0b0000000000,
      SCOPE_PROGRAM = 0b0000000001,
      SCOPE_FUNCTION = 0b0000000010,
      SCOPE_ASYNC = 0b0000000100,
      SCOPE_GENERATOR = 0b0000001000,
      SCOPE_ARROW = 0b0000010000,
      SCOPE_SIMPLE_CATCH = 0b0000100000,
      SCOPE_SUPER = 0b0001000000,
      SCOPE_DIRECT_SUPER = 0b0010000000,
      SCOPE_CLASS = 0b0100000000,
      SCOPE_TS_MODULE = 0b1000000000,
      SCOPE_VAR = SCOPE_PROGRAM | SCOPE_FUNCTION | SCOPE_TS_MODULE;
exports.SCOPE_VAR = SCOPE_VAR;
exports.SCOPE_TS_MODULE = SCOPE_TS_MODULE;
exports.SCOPE_CLASS = SCOPE_CLASS;
exports.SCOPE_DIRECT_SUPER = SCOPE_DIRECT_SUPER;
exports.SCOPE_SUPER = SCOPE_SUPER;
exports.SCOPE_SIMPLE_CATCH = SCOPE_SIMPLE_CATCH;
exports.SCOPE_ARROW = SCOPE_ARROW;
exports.SCOPE_GENERATOR = SCOPE_GENERATOR;
exports.SCOPE_ASYNC = SCOPE_ASYNC;
exports.SCOPE_FUNCTION = SCOPE_FUNCTION;
exports.SCOPE_PROGRAM = SCOPE_PROGRAM;
exports.SCOPE_OTHER = SCOPE_OTHER;

function functionFlags(isAsync, isGenerator) {
  return SCOPE_FUNCTION | (isAsync ? SCOPE_ASYNC : 0) | (isGenerator ? SCOPE_GENERATOR : 0);
}

const BIND_KIND_VALUE = 0b00000000001,
      BIND_KIND_TYPE = 0b00000000010,
      BIND_SCOPE_VAR = 0b00000000100,
      BIND_SCOPE_LEXICAL = 0b00000001000,
      BIND_SCOPE_FUNCTION = 0b00000010000,
      BIND_SCOPE_OUTSIDE = 0b00000100000,
      BIND_FLAGS_NONE = 0b00001000000,
      BIND_FLAGS_CLASS = 0b00010000000,
      BIND_FLAGS_TS_ENUM = 0b00100000000,
      BIND_FLAGS_TS_CONST_ENUM = 0b01000000000,
      BIND_FLAGS_TS_EXPORT_ONLY = 0b10000000000;
exports.BIND_FLAGS_TS_EXPORT_ONLY = BIND_FLAGS_TS_EXPORT_ONLY;
exports.BIND_FLAGS_TS_CONST_ENUM = BIND_FLAGS_TS_CONST_ENUM;
exports.BIND_FLAGS_TS_ENUM = BIND_FLAGS_TS_ENUM;
exports.BIND_FLAGS_CLASS = BIND_FLAGS_CLASS;
exports.BIND_FLAGS_NONE = BIND_FLAGS_NONE;
exports.BIND_SCOPE_OUTSIDE = BIND_SCOPE_OUTSIDE;
exports.BIND_SCOPE_FUNCTION = BIND_SCOPE_FUNCTION;
exports.BIND_SCOPE_LEXICAL = BIND_SCOPE_LEXICAL;
exports.BIND_SCOPE_VAR = BIND_SCOPE_VAR;
exports.BIND_KIND_TYPE = BIND_KIND_TYPE;
exports.BIND_KIND_VALUE = BIND_KIND_VALUE;
const BIND_CLASS = BIND_KIND_VALUE | BIND_KIND_TYPE | BIND_SCOPE_LEXICAL | BIND_FLAGS_CLASS,
      BIND_LEXICAL = BIND_KIND_VALUE | 0 | BIND_SCOPE_LEXICAL | 0,
      BIND_VAR = BIND_KIND_VALUE | 0 | BIND_SCOPE_VAR | 0,
      BIND_FUNCTION = BIND_KIND_VALUE | 0 | BIND_SCOPE_FUNCTION | 0,
      BIND_TS_INTERFACE = 0 | BIND_KIND_TYPE | 0 | BIND_FLAGS_CLASS,
      BIND_TS_TYPE = 0 | BIND_KIND_TYPE | 0 | 0,
      BIND_TS_ENUM = BIND_KIND_VALUE | BIND_KIND_TYPE | BIND_SCOPE_LEXICAL | BIND_FLAGS_TS_ENUM,
      BIND_TS_AMBIENT = 0 | 0 | 0 | BIND_FLAGS_TS_EXPORT_ONLY,
      BIND_NONE = 0 | 0 | 0 | BIND_FLAGS_NONE,
      BIND_OUTSIDE = BIND_KIND_VALUE | 0 | 0 | BIND_FLAGS_NONE,
      BIND_TS_CONST_ENUM = BIND_TS_ENUM | BIND_FLAGS_TS_CONST_ENUM,
      BIND_TS_NAMESPACE = 0 | 0 | 0 | BIND_FLAGS_TS_EXPORT_ONLY;
exports.BIND_TS_NAMESPACE = BIND_TS_NAMESPACE;
exports.BIND_TS_CONST_ENUM = BIND_TS_CONST_ENUM;
exports.BIND_OUTSIDE = BIND_OUTSIDE;
exports.BIND_NONE = BIND_NONE;
exports.BIND_TS_AMBIENT = BIND_TS_AMBIENT;
exports.BIND_TS_ENUM = BIND_TS_ENUM;
exports.BIND_TS_TYPE = BIND_TS_TYPE;
exports.BIND_TS_INTERFACE = BIND_TS_INTERFACE;
exports.BIND_FUNCTION = BIND_FUNCTION;
exports.BIND_VAR = BIND_VAR;
exports.BIND_LEXICAL = BIND_LEXICAL;
exports.BIND_CLASS = BIND_CLASS;