aboutsummaryrefslogtreecommitdiffstats
path: root/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/task/util/template/LiteralSection.java
blob: 50c07fd1e7ee26cbe491ec55c286771e10c4fa0f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.hosted.node.admin.task.util.template;

import com.yahoo.vespa.hosted.node.admin.task.util.text.CursorRange;

/**
 * Represents a template literal section
 *
 * @see Template
 * @author hakonhall
 */
class LiteralSection extends Section {
    LiteralSection(CursorRange range) {
        super("literal", range);
    }

    @Override
    void appendTo(StringBuilder buffer) {
        range().appendTo(buffer);
    }

    @Override
    void appendCopyTo(SectionList sectionList) {
        sectionList.appendLiteralSection(range().end());
    }
}