UNPKG

949 BJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3const property_1 = require("../property");
4const propertyInstruction_1 = require("../propertyInstruction");
5class Arg extends propertyInstruction_1.PropertyInstruction {
6 constructor(document, range, dockerfile, escapeChar, instruction, instructionRange) {
7 super(document, range, dockerfile, escapeChar, instruction, instructionRange);
8 this.property = null;
9 const args = this.getPropertyArguments();
10 if (args.length === 1) {
11 this.property = new property_1.Property(this.document, this.escapeChar, args[0]);
12 }
13 else {
14 this.property = null;
15 }
16 }
17 /**
18 * Returns the variable defined by this ARG. This may be null if
19 * this ARG instruction is malformed and has no variable
20 * declaration.
21 */
22 getProperty() {
23 return this.property;
24 }
25}
26exports.Arg = Arg;