UNPKG

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