UNPKG

1.53 kBJavaScriptView Raw
1"use strict";
2/**
3 * @license
4 * Copyright (c) 2016 The Polymer Project Authors. All rights reserved.
5 * This code may only be used under the BSD style license found at
6 * http://polymer.github.io/LICENSE.txt
7 * The complete set of authors may be found at
8 * http://polymer.github.io/AUTHORS.txt
9 * The complete set of contributors may be found at
10 * http://polymer.github.io/CONTRIBUTORS.txt
11 * Code distributed by Google as part of the polymer project is also
12 * subject to an additional IP rights grant found at
13 * http://polymer.github.io/PATENTS.txt
14 */
15Object.defineProperty(exports, "__esModule", { value: true });
16class ElementReference {
17 constructor(scannedRef, _document) {
18 this.kinds = new Set(['element-reference']);
19 this.tagName = scannedRef.tagName;
20 this.attributes = scannedRef.attributes;
21 this.sourceRange = scannedRef.sourceRange;
22 this.astNode = scannedRef.astNode;
23 this.warnings = scannedRef.warnings;
24 }
25 get identifiers() {
26 return new Set([this.tagName]);
27 }
28}
29exports.ElementReference = ElementReference;
30class ScannedElementReference {
31 constructor(tagName, sourceRange, ast) {
32 this.attributes = new Map();
33 this.warnings = [];
34 this.tagName = tagName;
35 this.sourceRange = sourceRange;
36 this.astNode = ast;
37 }
38 resolve(document) {
39 return new ElementReference(this, document);
40 }
41}
42exports.ScannedElementReference = ScannedElementReference;
43//# sourceMappingURL=element-reference.js.map
\No newline at end of file