class Macro extends Node {
    protected BasedSequence openingMarker = BasedSequence.NULL;
    protected BasedSequence name = BasedSequence.NULL;
    protected BasedSequence attributeText = BasedSequence.NULL;
    protected BasedSequence closingMarker = BasedSequence.NULL;

    @NotNull
    @Override
    public BasedSequence[] getSegments() {
        //return EMPTY_SEGMENTS;
        return new BasedSequence[] { openingMarker, name, attributeText, closingMarker };
    }

    @Override
    public void getAstExtra(@NotNull StringBuilder out) {
        segmentSpanChars(out, openingMarker, "open");
        segmentSpanChars(out, name, "name");
        segmentSpanChars(out, attributeText, "attributes");
        segmentSpanChars(out, closingMarker, "close");
        if (isClosedTag()) out.append(" isClosed");
        if (isBlockMacro()) out.append(" isBlockMacro");
        segmentSpanChars(out, getMacroContentChars(), "macroContent");
    }

    public Macro() {
    }

    public Macro(BasedSequence chars) {
        super(chars);
    }

    public Macro(BasedSequence openingMarker, BasedSequence name, BasedSequence closingMarker) {
        super(openingMarker.baseSubSequence(openingMarker.getStartOffset(), closingMarker.getEndOffset()));
        this.openingMarker = openingMarker;
        this.name = name;
        this.closingMarker = closingMarker;
    }

    public BasedSequence getOpeningMarker() {
        return openingMarker;
    }

    public void setOpeningMarker(BasedSequence openingMarker) {
        this.openingMarker = openingMarker;
    }

    public BasedSequence getName() {
        return name;
    }

    public void setName(BasedSequence name) {
        this.name = name;
    }

    public BasedSequence getClosingMarker() {
        return closingMarker;
    }

    public void setClosingMarker(BasedSequence closingMarker) {
        this.closingMarker = closingMarker;
    }

    public BasedSequence getAttributeText() {
        return attributeText;
    }

    public void setAttributeText(BasedSequence attributeText) {
        this.attributeText = attributeText;
    }

    public boolean isBlockMacro() {
        Node parent = getParent();
        return parent instanceof MacroBlock && parent.getFirstChild() == this;
    }

    public Map<String, String> getAttributes() {<FILL_FUNCTION_BODY>}

    public BasedSequence getMacroContentChars() {
        Node lastChild = getLastChild();
        int startOffset = getClosingMarker().getEndOffset();
        int endOffset = lastChild == null || lastChild instanceof MacroAttribute ? getEndOffset() : lastChild.getStartOffset();
        return isClosedTag() ? BasedSequence.NULL : getChars().baseSubSequence(startOffset, endOffset);
    }

    public boolean isClosedTag() {
        return getClosingMarker().length() > 2;
    }
}

        Map<String, String> attributes = new LinkedHashMap<>();
        Node child = getFirstChild();
        while (child != null) {
            if (child instanceof MacroAttribute) {
                MacroAttribute attribute = (MacroAttribute) child;
                attributes.put(attribute.getAttribute().toString(), attribute.getValue().toString());
            }
            child = child.getNext();
        }
        return attributes;
    
<methods>public void <init>() ,public void <init>(@NotNull BasedSequence) ,public void appendChain(@NotNull Node) ,public void appendChild(com.vladsch.flexmark.util.ast.Node) ,public static void astChars(@NotNull StringBuilder, @NotNull CharSequence, @NotNull String) ,public void astExtraChars(@NotNull StringBuilder) ,public void astString(@NotNull StringBuilder, boolean) ,public com.vladsch.flexmark.util.sequence.BasedSequence baseSubSequence(int, int) ,public com.vladsch.flexmark.util.sequence.BasedSequence baseSubSequence(int) ,public transient int countAncestorsOfType(@NotNull Class<?> []) ,public transient int countDirectAncestorsOfType(@Nullable Class<?>, @NotNull Class<?> []) ,public static void delimitedSegmentSpan(@NotNull StringBuilder, @NotNull BasedSequence, @NotNull BasedSequence, @NotNull BasedSequence, @NotNull String) ,public static void delimitedSegmentSpanChars(@NotNull StringBuilder, @NotNull BasedSequence, @NotNull BasedSequence, @NotNull BasedSequence, @NotNull String) ,public int endOfLine(int) ,public void extractChainTo(@NotNull Node) ,public void extractToFirstInChain(@NotNull Node) ,public transient @Nullable Node getAncestorOfType(@NotNull Class<?> []) ,public void getAstExtra(@NotNull StringBuilder) ,public com.vladsch.flexmark.util.sequence.BasedSequence getBaseSequence() ,public @NotNull Node getBlankLineSibling() ,public @NotNull BasedSequence getChars() ,public @NotNull BasedSequence getCharsFromSegments() ,public com.vladsch.flexmark.util.sequence.BasedSequence getChildChars() ,public @NotNull ReversiblePeekingIterator<Node> getChildIterator() ,public transient @Nullable Node getChildOfType(@NotNull Class<?> []) ,public @NotNull ReversiblePeekingIterable<Node> getChildren() ,public @NotNull ReversiblePeekingIterable<Node> getDescendants() ,public @NotNull Document getDocument() ,public com.vladsch.flexmark.util.sequence.BasedSequence getEmptyPrefix() ,public com.vladsch.flexmark.util.sequence.BasedSequence getEmptySuffix() ,public int getEndLineNumber() ,public int getEndOfLine() ,public int getEndOffset() ,public com.vladsch.flexmark.util.sequence.BasedSequence getExactChildChars() ,public @Nullable Node getFirstChild() ,public transient @Nullable Node getFirstChildAny(@NotNull Class<?> []) ,public transient @Nullable Node getFirstChildAnyNot(@NotNull Class<?> []) ,public @NotNull Node getFirstInChain() ,public @Nullable Node getGrandParent() ,public @Nullable Node getLastBlankLineChild() ,public @Nullable Node getLastChild() ,public transient @Nullable Node getLastChildAny(@NotNull Class<?> []) ,public transient @Nullable Node getLastChildAnyNot(@NotNull Class<?> []) ,public @NotNull Node getLastInChain() ,public static @NotNull BasedSequence getLeadSegment(@NotNull BasedSequence []) ,public Pair<java.lang.Integer,java.lang.Integer> getLineColumnAtEnd() ,public int getLineNumber() ,public @Nullable Node getNext() ,public transient @Nullable Node getNextAny(@NotNull Class<?> []) ,public transient @Nullable Node getNextAnyNot(@NotNull Class<?> []) ,public @NotNull String getNodeName() ,public static transient int getNodeOfTypeIndex(@NotNull Node, @NotNull Class<?> []) ,public transient int getNodeOfTypeIndex(@NotNull Class<?> []) ,public @Nullable Node getOldestAncestorOfTypeAfter(@NotNull Class<?>, @NotNull Class<?>) ,public @Nullable Node getParent() ,public @Nullable Node getPrevious() ,public transient @Nullable Node getPreviousAny(@NotNull Class<?> []) ,public transient @Nullable Node getPreviousAnyNot(@NotNull Class<?> []) ,public @NotNull ReversiblePeekingIterator<Node> getReversedChildIterator() ,public @NotNull ReversiblePeekingIterable<Node> getReversedChildren() ,public @NotNull ReversiblePeekingIterable<Node> getReversedDescendants() ,public abstract @NotNull BasedSequence [] getSegments() ,public @NotNull BasedSequence [] getSegmentsForChars() ,public com.vladsch.flexmark.util.sequence.Range getSourceRange() ,public int getStartLineNumber() ,public int getStartOfLine() ,public int getStartOffset() ,public int getTextLength() ,public static @NotNull BasedSequence getTrailSegment(com.vladsch.flexmark.util.sequence.BasedSequence[]) ,public boolean hasChildren() ,public boolean hasOrMoreChildren(int) ,public void insertAfter(@NotNull Node) ,public void insertBefore(com.vladsch.flexmark.util.ast.Node) ,public void insertChainAfter(@NotNull Node) ,public void insertChainBefore(@NotNull Node) ,public transient boolean isOrDescendantOfType(@NotNull Class<?> []) ,public Pair<java.lang.Integer,java.lang.Integer> lineColumnAtIndex(int) ,public Pair<java.lang.Integer,java.lang.Integer> lineColumnAtStart() ,public void moveTrailingBlankLines() ,public void prependChild(@NotNull Node) ,public void removeChildren() ,public static void segmentSpan(@NotNull StringBuilder, int, int, @Nullable String) ,public static void segmentSpan(@NotNull StringBuilder, @NotNull BasedSequence, @Nullable String) ,public static void segmentSpanChars(@NotNull StringBuilder, int, int, @Nullable String, @NotNull String) ,public static void segmentSpanChars(@NotNull StringBuilder, int, int, @Nullable String, @NotNull String, @NotNull String, @NotNull String) ,public static void segmentSpanChars(@NotNull StringBuilder, @NotNull BasedSequence, @NotNull String) ,public static void segmentSpanCharsToVisible(@NotNull StringBuilder, @NotNull BasedSequence, @NotNull String) ,public void setChars(@NotNull BasedSequence) ,public void setCharsFromContent() ,public void setCharsFromContentOnly() ,public void setCharsFromSegments() ,public static transient @NotNull BasedSequence spanningChars(com.vladsch.flexmark.util.sequence.BasedSequence[]) ,public int startOfLine(int) ,public void takeChildren(@NotNull Node) ,public @NotNull String toAstString(boolean) ,public static @NotNull String toSegmentSpan(@NotNull BasedSequence, @Nullable String) ,public java.lang.String toString() ,public void unlink() <variables>public static final AstNode<com.vladsch.flexmark.util.ast.Node> AST_ADAPTER,public static final com.vladsch.flexmark.util.sequence.BasedSequence[] EMPTY_SEGMENTS,public static final java.lang.String SPLICE,private @NotNull BasedSequence chars,@Nullable Node firstChild,private @Nullable Node lastChild,@Nullable Node next,private @Nullable Node parent,private @Nullable Node prev