class SourceCommentsPrettyPrinter extends SourcePrettyPrinter
Pretty printer which parses and pretty-prints code with comments Mostly uses the function 'withComments' to add comments to parent functions. To format comments properly in lists usages of 'enclosedList' were replaced with listWComments.
Linear Supertypes
Ordering
- Alphabetic
- By Inheritance
Inherited
- SourceCommentsPrettyPrinter
- SourcePrettyPrinter
- ParenPrettyPrinter
- Rql2TypeUtils
- Keywords
- SourcePrettyPrinter
- StrictLogging
- Keywords
- PrettyPrinter
- PrettyPrinter
- PrettyPrinterBase
- AnyRef
- Any
- Hide All
- Show All
Visibility
- Public
- All
Instance Constructors
- new SourceCommentsPrettyPrinter(maybeIndent: Option[Int] = None, maybeWidth: Option[Int] = None)
Type Members
-
implicit
class
extraDocOps extends Doc
- Definition Classes
- PrettyPrinter
-
implicit
class
extraStringDocOps extends AnyRef
- Definition Classes
- PrettyPrinter
-
type
Buffer = Seq[Entry]
- Definition Classes
- PrettyPrinter
-
class
Doc extends DocCont with org.bitbucket.inkytonik.kiama.output.PrettyPrinter.DocOps
- Definition Classes
- PrettyPrinter
-
type
DocCont = (IW) ⇒ (TreeCont) ⇒ Trampoline[TreeCont]
- Definition Classes
- PrettyPrinter
-
trait
DocOps extends AnyRef
- Definition Classes
- PrettyPrinterBase
-
type
Dq = Queue[(PPosition, OutGroup)]
- Definition Classes
- PrettyPrinter
-
type
Effect = (Buffer) ⇒ Buffer
- Definition Classes
- PrettyPrinter
-
sealed abstract
class
Entry extends AnyRef
- Definition Classes
- PrettyPrinter
-
case class
Finish extends Entry with Product with Serializable
- Definition Classes
- PrettyPrinter
-
case class
FinishOffset extends Entry with Product with Serializable
- Definition Classes
- PrettyPrinter
-
type
Horizontal = Boolean
- Definition Classes
- PrettyPrinter
-
type
IW = (Indent, Width)
- Definition Classes
- PrettyPrinter
-
type
Out = (Remaining) ⇒ Trampoline[Buffer]
- Definition Classes
- PrettyPrinter
-
type
OutGroup = (Horizontal) ⇒ (Out) ⇒ Trampoline[Out]
- Definition Classes
- PrettyPrinter
-
type
PPosition = Int
- Definition Classes
- PrettyPrinter
-
type
Remaining = Int
- Definition Classes
- PrettyPrinter
-
case class
Start extends Entry with Product with Serializable
- Definition Classes
- PrettyPrinter
-
case class
StartOffset extends Entry with Product with Serializable
- Definition Classes
- PrettyPrinter
-
case class
Text extends Entry with Product with Serializable
- Definition Classes
- PrettyPrinter
-
type
TreeCont = (PPosition, Dq) ⇒ Trampoline[Out]
- Definition Classes
- PrettyPrinter
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
addProp(t: Type, p: Rql2TypeProperty): Type
- Definition Classes
- Rql2TypeUtils
-
final
def
addProps(t: Type, props: Set[Rql2TypeProperty]): Type
- Definition Classes
- Rql2TypeUtils
-
def
align(d: Doc): Doc
- Definition Classes
- PrettyPrinterBase
-
def
ampersand: Doc
- Definition Classes
- PrettyPrinterBase
-
def
angles(d: Doc): Doc
- Definition Classes
- PrettyPrinterBase
-
def
any(a: Any): Doc
- Definition Classes
- PrettyPrinterBase
-
def
args(n: Vector[SourceNode]): Doc
- Attributes
- protected
- Definition Classes
- SourcePrettyPrinter
-
def
args(n: Doc*): Doc
- Definition Classes
- SourcePrettyPrinter
-
def
arguments[T](l: Seq[T], elemToDoc: (T) ⇒ Doc, sep: Doc, sepfn: (Seq[Doc], Doc) ⇒ Doc): Doc
- Definition Classes
- PrettyPrinterBase
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
asterisk: Doc
- Definition Classes
- PrettyPrinterBase
-
def
atsign: Doc
- Definition Classes
- PrettyPrinterBase
-
def
backquote: Doc
- Definition Classes
- PrettyPrinterBase
-
def
backslash: Doc
- Definition Classes
- PrettyPrinterBase
-
implicit
def
baseNodeToDoc(n: BaseNode): Doc
- Attributes
- protected
- Definition Classes
- SourcePrettyPrinter
-
def
braces(d: Doc): Doc
- Definition Classes
- PrettyPrinterBase
-
def
bracket(outer: PrettyOperatorExpression, inner: PrettyOperatorExpression, side: Side): Doc
- Definition Classes
- ParenPrettyPrinter
-
def
brackets(d: Doc): Doc
- Definition Classes
- PrettyPrinterBase
-
def
caret: Doc
- Definition Classes
- PrettyPrinterBase
-
def
cat(ds: Seq[Doc]): Doc
- Definition Classes
- PrettyPrinterBase
-
implicit
def
char(c: Char): Doc
- Definition Classes
- PrettyPrinterBase
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native() @IntrinsicCandidate()
-
def
colon: Doc
- Definition Classes
- PrettyPrinterBase
-
def
column(f: (Int) ⇒ Doc): Doc
- Definition Classes
- PrettyPrinter → PrettyPrinterBase
-
def
comma: Doc
- Definition Classes
- PrettyPrinterBase
- val control: Char
-
val
defaultIndent: Int
- Definition Classes
- SourceCommentsPrettyPrinter → PrettyPrinterBase
-
val
defaultWidth: Int
- Definition Classes
- SourceCommentsPrettyPrinter → PrettyPrinterBase
-
def
dollar: Doc
- Definition Classes
- PrettyPrinterBase
-
def
dot: Doc
- Definition Classes
- PrettyPrinterBase
-
def
dquote: Doc
- Definition Classes
- PrettyPrinterBase
-
def
dquoted(s: String): Doc
- Attributes
- protected
- Definition Classes
- SourcePrettyPrinter
-
def
dquotes(d: Doc): Doc
- Definition Classes
- PrettyPrinterBase
-
def
emptyDoc: Doc
- Definition Classes
- PrettyPrinter → PrettyPrinterBase
-
def
enclose(l: Doc, d: Doc, r: Doc): Doc
- Definition Classes
- PrettyPrinterBase
-
def
enclosedList(ls: Seq[Doc], sep: Doc = comma): Doc
- Attributes
- protected
- Definition Classes
- SourcePrettyPrinter
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equal: Doc
- Definition Classes
- PrettyPrinterBase
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
exclamation: Doc
- Definition Classes
- PrettyPrinterBase
-
def
fillcat(ds: Seq[Doc]): Doc
- Definition Classes
- PrettyPrinterBase
-
def
fillsep(ds: Seq[Doc], sep: Doc): Doc
- Definition Classes
- PrettyPrinterBase
-
def
fillsep(ds: Seq[Doc]): Doc
- Definition Classes
- PrettyPrinterBase
-
def
folddoc(ds: Seq[Doc], f: (Doc, Doc) ⇒ Doc): Doc
- Definition Classes
- PrettyPrinterBase
- def forcedLinebreak(): Doc
-
def
format(n: BaseNode): String
- Definition Classes
- SourceCommentsPrettyPrinter → PrettyPrinter
-
def
forwslash: Doc
- Definition Classes
- PrettyPrinterBase
-
def
funAppArg(a: FunAppArg): Doc
- Definition Classes
- SourceCommentsPrettyPrinter → SourcePrettyPrinter
-
def
funParam(a: FunParam): Doc
- Definition Classes
- SourceCommentsPrettyPrinter → SourcePrettyPrinter
-
def
funProto(f: FunProto): Doc
- Definition Classes
- SourceCommentsPrettyPrinter → SourcePrettyPrinter
- def funProtoWComments(f: FunProto, sep: Doc): Doc
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
-
final
def
getProps(t: Type): Set[Rql2TypeProperty]
- Definition Classes
- Rql2TypeUtils
-
def
group(d: Doc): Doc
- Definition Classes
- PrettyPrinter → PrettyPrinterBase
-
def
hang(d: Doc, i: Indent): Doc
- Definition Classes
- PrettyPrinterBase
-
final
def
hasTypeConstraint(t: Type): Boolean
- Definition Classes
- Rql2TypeUtils
-
def
hash: Doc
- Definition Classes
- PrettyPrinterBase
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
-
def
hcat(ds: Seq[Doc]): Doc
- Definition Classes
- PrettyPrinterBase
-
def
hsep(ds: Seq[Doc], sep: Doc): Doc
- Definition Classes
- PrettyPrinterBase
-
def
hsep(ds: Seq[Doc]): Doc
- Definition Classes
- PrettyPrinterBase
-
def
ident(idn: String): String
- Definition Classes
- SourcePrettyPrinter
-
def
idnToDoc(i: CommonIdnNode): Doc
- Attributes
- protected
- Definition Classes
- SourcePrettyPrinter
-
def
indent(d: Doc, i: Indent): Doc
- Definition Classes
- PrettyPrinterBase
-
final
def
inferTypeToRql2Type(t: SourceType, makeNullable: Boolean, makeTryable: Boolean): Type
- Definition Classes
- Rql2TypeUtils
-
def
insert(len: Int, entry: Entry): Doc
- Definition Classes
- PrettyPrinter
-
def
internal: Boolean
- Attributes
- protected
- Definition Classes
- SourcePrettyPrinter
-
def
isBridge(a: Any): Boolean
- Definition Classes
- PrettyPrinterBase
-
def
isComparable(t: Type): Boolean
- Definition Classes
- Rql2TypeUtils
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def isReserved(idn: String): Boolean
- def isReservedType(idn: String): Boolean
-
final
def
isTypeConstraint(t: Type): Boolean
- Definition Classes
- Rql2TypeUtils
- def lFoldWComment(ls: Seq[(BaseNode, Doc)], sep: Doc): Doc
-
def
langle: Doc
- Definition Classes
- PrettyPrinterBase
-
def
layout(d: Doc, w: Width): Layout
- Definition Classes
- PrettyPrinterBase
-
def
lbrace: Doc
- Definition Classes
- PrettyPrinterBase
-
def
lbracket: Doc
- Definition Classes
- PrettyPrinterBase
-
def
leave(c: TreeCont): TreeCont
- Definition Classes
- PrettyPrinter
-
def
line: Doc
- Definition Classes
- PrettyPrinter → PrettyPrinterBase
-
def
line(repl: Layout): Doc
- Definition Classes
- PrettyPrinter → PrettyPrinterBase
-
def
linebreak: Doc
- Definition Classes
- PrettyPrinter → PrettyPrinterBase
-
def
link(n: AnyRef, d: Doc): Doc
- Definition Classes
- PrettyPrinter → PrettyPrinterBase
-
def
linkRange(f: Int, t: Int, d: Doc): Doc
- Definition Classes
- PrettyPrinter → PrettyPrinterBase
-
def
links(d: Doc, w: Width): Links
- Definition Classes
- PrettyPrinterBase
-
def
list[T](l: List[T], prefix: String, elemToDoc: (T) ⇒ Doc, sep: Doc, sepfn: (Seq[Doc], Doc) ⇒ Doc): Doc
- Definition Classes
- PrettyPrinterBase
- def listWComments(ls: Seq[(BaseNode, Doc)], sep: Doc = comma): Doc
-
val
logger: Logger
- Attributes
- protected
- Definition Classes
- StrictLogging
-
def
lparen: Doc
- Definition Classes
- PrettyPrinterBase
-
def
lsep(ds: Seq[Doc], sep: Doc): Doc
- Definition Classes
- PrettyPrinterBase
-
def
lsep2(ds: Seq[Doc], sep: Doc): Doc
- Definition Classes
- PrettyPrinterBase
-
def
lterm(ds: Seq[Doc], term: Doc): Doc
- Definition Classes
- PrettyPrinterBase
-
def
method(name: Doc, n: Doc*): Doc
- Definition Classes
- SourcePrettyPrinter → SourcePrettyPrinter
-
def
minus: Doc
- Definition Classes
- PrettyPrinterBase
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
nest(d: Doc, j: Indent): Doc
- Definition Classes
- PrettyPrinter → PrettyPrinterBase
-
def
nesting(f: (Int) ⇒ Doc): Doc
- Definition Classes
- PrettyPrinter → PrettyPrinterBase
-
def
noparens(outer: PrettyOperatorExpression, inner: PrettyOperatorExpression, side: Side): Boolean
- Definition Classes
- ParenPrettyPrinter
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
-
def
output(o: Out, r: Int, entry: Entry): More[Buffer]
- Definition Classes
- PrettyPrinter
-
def
padto(p: Int, d: Doc): Doc
- Definition Classes
- PrettyPrinterBase
-
def
padtobreak(p: Int, d: Doc): Doc
- Definition Classes
- PrettyPrinterBase
-
def
parens(d: Doc): Doc
- Definition Classes
- PrettyPrinterBase
-
def
percent: Doc
- Definition Classes
- PrettyPrinterBase
-
def
plus: Doc
- Definition Classes
- PrettyPrinterBase
-
def
pretty(d: Doc, w: Width): Document
- Definition Classes
- PrettyPrinter → PrettyPrinterBase
- def prettyCode(code: String): Either[(String, Position), String]
-
def
prune(c1: TreeCont): TreeCont
- Definition Classes
- PrettyPrinter
-
def
question: Doc
- Definition Classes
- PrettyPrinterBase
-
def
rangle: Doc
- Definition Classes
- PrettyPrinterBase
-
def
rawTypeToRql2Type(t: RawType): Type
- Definition Classes
- Rql2TypeUtils
-
def
rawValueToRql2Value(v: RawValue, t: RawType): Value
- Definition Classes
- Rql2TypeUtils
-
def
rbrace: Doc
- Definition Classes
- PrettyPrinterBase
-
def
rbracket: Doc
- Definition Classes
- PrettyPrinterBase
-
def
recursiveToDoc(outer: PrettyOperatorExpression, inner: PrettyExpression, side: Side): Doc
- Definition Classes
- ParenPrettyPrinter
-
final
def
removeProp(t: Type, p: Rql2TypeProperty): Type
- Definition Classes
- Rql2TypeUtils
-
final
def
removeProps(t: Type, props: Set[Rql2TypeProperty]): Type
- Definition Classes
- Rql2TypeUtils
-
final
def
resetProps(t: Type, props: Set[Rql2TypeProperty]): Type
- Definition Classes
- Rql2TypeUtils
-
def
rparen: Doc
- Definition Classes
- PrettyPrinterBase
-
def
rql2Exp(e: Rql2Exp): Doc
- Definition Classes
- SourceCommentsPrettyPrinter → SourcePrettyPrinter
-
def
rql2LetDecl(d: LetDecl): Doc
- Attributes
- protected
- Definition Classes
- SourcePrettyPrinter
-
def
rql2Node(n: Rql2Node): Doc
- Definition Classes
- SourceCommentsPrettyPrinter → SourcePrettyPrinter
-
def
rql2Type(t: Rql2Type): Doc
- Attributes
- protected
- Definition Classes
- SourcePrettyPrinter
-
def
rql2TypeToRawType(t: Type): Option[RawType]
- Definition Classes
- Rql2TypeUtils
-
def
rql2TypeWithProperties(t: Rql2TypeWithProperties): Doc
- Definition Classes
- SourceCommentsPrettyPrinter → SourcePrettyPrinter
-
def
scan(l: Width, out: OutGroup)(c: TreeCont): Trampoline[TreeCont]
- Definition Classes
- PrettyPrinter
-
def
semi: Doc
- Definition Classes
- PrettyPrinterBase
-
def
sep(ds: Seq[Doc]): Doc
- Definition Classes
- PrettyPrinterBase
-
def
sepArgs(sep: Doc, elems: Doc*): Doc
- Attributes
- protected
- Definition Classes
- SourcePrettyPrinter
-
def
seq[T](l: Seq[T], prefix: String, elemToDoc: (T) ⇒ Doc, sep: Doc, sepfn: (Seq[Doc], Doc) ⇒ Doc): Doc
- Definition Classes
- PrettyPrinterBase
-
def
softbreak: Doc
- Definition Classes
- PrettyPrinterBase
-
def
softline: Doc
- Definition Classes
- PrettyPrinterBase
-
def
space: Doc
- Definition Classes
- PrettyPrinterBase
-
def
spaces(n: Int): Doc
- Definition Classes
- PrettyPrinterBase
-
def
squote: Doc
- Definition Classes
- PrettyPrinterBase
-
def
squotes(d: Doc): Doc
- Definition Classes
- PrettyPrinterBase
-
def
ssep(ds: Seq[Doc], sep: Doc): Doc
- Definition Classes
- PrettyPrinterBase
-
def
sterm(ds: Seq[Doc], term: Doc): Doc
- Definition Classes
- PrettyPrinterBase
-
def
string(s: String): Doc
- Definition Classes
- PrettyPrinterBase
-
def
surround(d: Doc, b: Doc): Doc
- Definition Classes
- PrettyPrinterBase
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
implicit
def
text(t: String): Doc
- Definition Classes
- PrettyPrinter → PrettyPrinterBase
-
def
tilde: Doc
- Definition Classes
- PrettyPrinterBase
-
def
toDoc(n: BaseNode): Doc
- Definition Classes
- SourceCommentsPrettyPrinter → SourcePrettyPrinter → SourcePrettyPrinter → PrettyPrinter
-
def
toParenDoc(e: PrettyExpression): Doc
- Definition Classes
- SourceCommentsPrettyPrinter → SourcePrettyPrinter → ParenPrettyPrinter
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
def
underscore: Doc
- Definition Classes
- PrettyPrinterBase
-
def
value(v: Any): Doc
- Definition Classes
- PrettyPrinterBase
-
def
vcat(ds: Seq[Doc]): Doc
- Definition Classes
- PrettyPrinterBase
-
def
verticalbar: Doc
- Definition Classes
- PrettyPrinterBase
-
def
vsep(ds: Seq[Doc], sep: Doc): Doc
- Definition Classes
- PrettyPrinterBase
-
def
vsep(ds: Seq[Doc]): Doc
- Definition Classes
- PrettyPrinterBase
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
def
width(d: Doc, f: (Int) ⇒ Doc): Doc
- Definition Classes
- PrettyPrinterBase
- def withComments(n: BaseNode, pretty: Doc): Doc
Deprecated Value Members
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] ) @Deprecated
- Deprecated