// SPDX-License-Identifier: Apache-2.0
import { KeyName } from '../key-name.js';
import { LexerNode } from './lexer-node.js';
import { ConfigKeyFormatter } from '../config-key-formatter.js';
export class LexerLeafNode extends LexerNode {
    value;
    constructor(parent, name, value, formatter = ConfigKeyFormatter.instance()) {
        super(parent, name, formatter);
        this.value = value;
    }
    isInternal() {
        return false;
    }
    isLeaf() {
        return true;
    }
    isRoot() {
        return this.parent === null || this.parent === undefined;
    }
    isArray() {
        return false;
    }
    isArrayIndex() {
        return KeyName.isArraySegment(this.name);
    }
}
//# sourceMappingURL=lexer-leaf-node.js.map