How to use multimap - 10 common examples

To help you get started, we’ve selected a few multimap examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github shapesecurity / shift-parser-js / src / early-error-state.js View on Github external
// BreakStatement nodes; cleared at iteration; switch; and function boundaries
    this.freeBreakStatements = [];
    // ContinueStatement nodes; cleared at
    this.freeContinueStatements = [];

    // labeled BreakStatement nodes; cleared at LabeledStatement with same Label and function boundaries
    this.freeLabeledBreakStatements = [];
    // labeled ContinueStatement nodes; cleared at labeled iteration statement with same Label and function boundaries
    this.freeLabeledContinueStatements = [];

    // NewTargetExpression nodes; cleared at function (besides arrow expression) boundaries
    this.newTargetExpressions = [];

    // BindingIdentifier nodes; cleared at containing declaration node
    this.boundNames = new MultiMap;
    // BindingIdentifiers that were found to be in a lexical binding position
    this.lexicallyDeclaredNames = new MultiMap;
    // BindingIdentifiers that were the name of a FunctionDeclaration
    this.functionDeclarationNames = new MultiMap;
    // BindingIdentifiers that were found to be in a variable binding position
    this.varDeclaredNames = new MultiMap;
    // BindingIdentifiers that were found to be in a variable binding position
    this.forOfVarDeclaredNames = [];

    // Names that this module exports
    this.exportedNames = new MultiMap;
    // Locally declared names that are referenced in export declarations
    this.exportedBindings = new MultiMap;

    // CallExpressions with Super callee
    this.superCallExpressions = [];
github shapesecurity / shift-parser-js / src / early-error-state.js View on Github external
// NewTargetExpression nodes; cleared at function (besides arrow expression) boundaries
    this.newTargetExpressions = [];

    // BindingIdentifier nodes; cleared at containing declaration node
    this.boundNames = new MultiMap;
    // BindingIdentifiers that were found to be in a lexical binding position
    this.lexicallyDeclaredNames = new MultiMap;
    // BindingIdentifiers that were the name of a FunctionDeclaration
    this.functionDeclarationNames = new MultiMap;
    // BindingIdentifiers that were found to be in a variable binding position
    this.varDeclaredNames = new MultiMap;
    // BindingIdentifiers that were found to be in a variable binding position
    this.forOfVarDeclaredNames = [];

    // Names that this module exports
    this.exportedNames = new MultiMap;
    // Locally declared names that are referenced in export declarations
    this.exportedBindings = new MultiMap;

    // CallExpressions with Super callee
    this.superCallExpressions = [];
    // SuperCall expressions in the context of a Method named "constructor"
    this.superCallExpressionsInConstructorMethod = [];
    // MemberExpressions with Super object
    this.superPropertyExpressions = [];

    // YieldExpression and YieldGeneratorExpression nodes; cleared at function boundaries
    this.yieldExpressions = [];
    // AwaitExpression nodes; cleared at function boundaries
    this.awaitExpressions = [];
  }
github shapesecurity / shift-parser-js / src / early-error-state.js View on Github external
// labeled BreakStatement nodes; cleared at LabeledStatement with same Label and function boundaries
    this.freeLabeledBreakStatements = [];
    // labeled ContinueStatement nodes; cleared at labeled iteration statement with same Label and function boundaries
    this.freeLabeledContinueStatements = [];

    // NewTargetExpression nodes; cleared at function (besides arrow expression) boundaries
    this.newTargetExpressions = [];

    // BindingIdentifier nodes; cleared at containing declaration node
    this.boundNames = new MultiMap;
    // BindingIdentifiers that were found to be in a lexical binding position
    this.lexicallyDeclaredNames = new MultiMap;
    // BindingIdentifiers that were the name of a FunctionDeclaration
    this.functionDeclarationNames = new MultiMap;
    // BindingIdentifiers that were found to be in a variable binding position
    this.varDeclaredNames = new MultiMap;
    // BindingIdentifiers that were found to be in a variable binding position
    this.forOfVarDeclaredNames = [];

    // Names that this module exports
    this.exportedNames = new MultiMap;
    // Locally declared names that are referenced in export declarations
    this.exportedBindings = new MultiMap;

    // CallExpressions with Super callee
    this.superCallExpressions = [];
    // SuperCall expressions in the context of a Method named "constructor"
    this.superCallExpressionsInConstructorMethod = [];
    // MemberExpressions with Super object
    this.superPropertyExpressions = [];

    // YieldExpression and YieldGeneratorExpression nodes; cleared at function boundaries
github shapesecurity / shift-parser-js / src / early-error-state.js View on Github external
this.freeBreakStatements = [];
    // ContinueStatement nodes; cleared at
    this.freeContinueStatements = [];

    // labeled BreakStatement nodes; cleared at LabeledStatement with same Label and function boundaries
    this.freeLabeledBreakStatements = [];
    // labeled ContinueStatement nodes; cleared at labeled iteration statement with same Label and function boundaries
    this.freeLabeledContinueStatements = [];

    // NewTargetExpression nodes; cleared at function (besides arrow expression) boundaries
    this.newTargetExpressions = [];

    // BindingIdentifier nodes; cleared at containing declaration node
    this.boundNames = new MultiMap;
    // BindingIdentifiers that were found to be in a lexical binding position
    this.lexicallyDeclaredNames = new MultiMap;
    // BindingIdentifiers that were the name of a FunctionDeclaration
    this.functionDeclarationNames = new MultiMap;
    // BindingIdentifiers that were found to be in a variable binding position
    this.varDeclaredNames = new MultiMap;
    // BindingIdentifiers that were found to be in a variable binding position
    this.forOfVarDeclaredNames = [];

    // Names that this module exports
    this.exportedNames = new MultiMap;
    // Locally declared names that are referenced in export declarations
    this.exportedBindings = new MultiMap;

    // CallExpressions with Super callee
    this.superCallExpressions = [];
    // SuperCall expressions in the context of a Method named "constructor"
    this.superCallExpressionsInConstructorMethod = [];
github shapesecurity / shift-parser-js / src / early-error-state.js View on Github external
this.freeContinueStatements = [];

    // labeled BreakStatement nodes; cleared at LabeledStatement with same Label and function boundaries
    this.freeLabeledBreakStatements = [];
    // labeled ContinueStatement nodes; cleared at labeled iteration statement with same Label and function boundaries
    this.freeLabeledContinueStatements = [];

    // NewTargetExpression nodes; cleared at function (besides arrow expression) boundaries
    this.newTargetExpressions = [];

    // BindingIdentifier nodes; cleared at containing declaration node
    this.boundNames = new MultiMap;
    // BindingIdentifiers that were found to be in a lexical binding position
    this.lexicallyDeclaredNames = new MultiMap;
    // BindingIdentifiers that were the name of a FunctionDeclaration
    this.functionDeclarationNames = new MultiMap;
    // BindingIdentifiers that were found to be in a variable binding position
    this.varDeclaredNames = new MultiMap;
    // BindingIdentifiers that were found to be in a variable binding position
    this.forOfVarDeclaredNames = [];

    // Names that this module exports
    this.exportedNames = new MultiMap;
    // Locally declared names that are referenced in export declarations
    this.exportedBindings = new MultiMap;

    // CallExpressions with Super callee
    this.superCallExpressions = [];
    // SuperCall expressions in the context of a Method named "constructor"
    this.superCallExpressionsInConstructorMethod = [];
    // MemberExpressions with Super object
    this.superPropertyExpressions = [];
github shapesecurity / shift-parser-js / src / early-error-state.js View on Github external
observeLexicalDeclaration() {
    addEach(this.lexicallyDeclaredNames, this.boundNames);
    this.boundNames = new MultiMap;
    return this;
  }
github shapesecurity / shift-parser-js / src / early-error-state.js View on Github external
functionDeclarationNamesAreLexical() {
    addEach(this.lexicallyDeclaredNames, this.functionDeclarationNames);
    this.functionDeclarationNames = new MultiMap;
    return this;
  }
github shapesecurity / shift-parser-js / src / early-error-state.js View on Github external
clearExportedBindings() {
    this.exportedBindings = new MultiMap;
    return this;
  }
github shapesecurity / shift-parser-js / src / early-error-state.js View on Github external
observeLexicalBoundary() {
    this.previousLexicallyDeclaredNames = this.lexicallyDeclaredNames;
    this.lexicallyDeclaredNames = new MultiMap;
    this.functionDeclarationNames = new MultiMap;
    return this;
  }
github shapesecurity / shift-parser-js / src / early-error-state.js View on Github external
observeVarDeclaration() {
    addEach(this.varDeclaredNames, this.boundNames);
    this.boundNames = new MultiMap;
    return this;
  }

multimap

multi-map which allow multiple values for the same key

MIT
Latest version published 4 years ago

Package Health Score

53 / 100
Full package analysis

Popular multimap functions