Module aya.base

Class Literate.CodeBlock

java.lang.Object
org.aya.concrete.remark.Literate.CodeBlock
All Implemented Interfaces:
Literate, org.aya.pretty.doc.Docile
Enclosing interface:
Literate

public static final class Literate.CodeBlock extends Object implements Literate
A code block
Implementation Note:
the content which this code block hold can be illegal, like
 ```aya
def foo : Nat => ```
  • Field Details

    • language

      @NotNull public final @NotNull String language
    • raw

      @NotNull public final @NotNull String raw
    • highlighted

      @Nullable public @Nullable org.aya.pretty.doc.Doc highlighted
    • sourcePos

      @Nullable public final @Nullable org.aya.util.error.SourcePos sourcePos
      The source pos of the code block ( without beginning '```', and ending '\n```' ) null if this code block is empty (length 0)
  • Constructor Details

    • CodeBlock

      public CodeBlock(@Nullable @Nullable org.aya.util.error.SourcePos sourcePos, @NotNull @NotNull String language, @NotNull @NotNull String raw)
  • Method Details

    • isAya

      public boolean isAya()
    • toDoc

      @NotNull public @NotNull org.aya.pretty.doc.Doc toDoc()
      Specified by:
      toDoc in interface org.aya.pretty.doc.Docile