Module aya.cli.impl

Record Class LiterateFaithfulPrettier

java.lang.Object
java.lang.Record
org.aya.cli.literate.LiterateFaithfulPrettier
Record Components:
problems - All problems of a single file
highlights - All highlights of a single file
All Implemented Interfaces:
Consumer<org.aya.literate.Literate>, FaithfulPrettier, org.aya.literate.LiterateConsumer

public record LiterateFaithfulPrettier(@NotNull kala.collection.immutable.ImmutableSeq<org.aya.util.reporter.Problem> problems, @NotNull kala.collection.immutable.ImmutableSeq<HighlightInfo> highlights, @NotNull org.aya.util.prettier.PrettierOptions options) extends Record implements org.aya.literate.LiterateConsumer, FaithfulPrettier
This prettier maintains all highlights created from SyntaxHighlight and all problems reported by Aya compiler. Implementation-wise, this prettier can be seen as a highlight server for a single file.

When the highlight of a code block is requested, it filters out all highlights and problems that belong to the code block, and then build a Doc containing the highlighted source code mixed with compiler outputs, as done in highlight(String, SourcePos).