public void setNewEndCharacter(int endCharacter) {
        if (originalSchemaNode == null) return;
        int currentOffset = originalSchemaNode.getEndOffset();
        int characterDelta = endCharacter - range.getEnd().getCharacter();

        originalSchemaNode.setEndOffset(currentOffset + characterDelta);
        this.range = CSTUtils.getNodeRange(originalSchemaNode);
    }
SchemaNode represents a node in the AST of a file the language server parses.
The node exposes a general interface to handle different AST from different parsers.
integration/schema-language-server/language-server/src/main/java/ai/vespa/schemals/tree/SchemaNode.java