|
kiama 0.9.0 API
|
|
kiama/attribution/Attributable.scala]
trait
Attributable
extends scala.Product with scala.util.parsing.input.Positional->
are desired.| Value Summary | |
var
|
_next
: Attributable
Private field backing next to make the types work correctly.
|
var
|
index
: Int
If this node is in a sequence, which child number is it
(counting from zero)? Otherwise, zero.
|
var
|
parent
: Attributable
A link to the parent Attributable node of this node or null if this
node has no parent. Note that this link will skip intervening
non-Attributable ancestors, such as
Option or
Seq nodes. |
| Values and Variables inherited from scala.util.parsing.input.Positional | |
| scala.util.parsing.input.Positional.pos |
| Method Summary | |
final def
|
->
[T](attr : (Attributable) => T) : T
Reference an attribute or function that can be applied to this node.
this->attribute is equivalent to attribute(this). |
def
|
children
: scala.Iterator[Attributable]
This node's attributable children in left-to-right order. Children
that are not Attributable are ignored, except for sequences (
Seq[_])
and optional children (Option[_]). In the case of sequences and
options, their contents are processed and any immediate Attributable
contents are included in the sequence. |
def
|
isFirst
: Boolean
If this node is in a sequence, is it the first element?
Otherwise, true.
|
def
|
isLast
: Boolean
If this node is in a sequence, is it the last element?
Otherwise, true.
|
def
|
isRoot
: Boolean
Is this node the root of the hierarchy?
|
def
|
next
: Attributable
If this node is a member of a sequence, a link to the next
node in the sequence. Null if this is the first node of the
sequence, or if it is not a member of a sequence.
|
def
|
parent
[T] : T
A short-hand for parent.asInstanceOf[T], which is useful in cases
a T-specific operation is applied to the parent, which otherwise
would be Attributable.
|
def
|
prev
: Attributable
If this node is a member of a sequence, a link to the previous
node in the sequence. Null if this is the first node of the
sequence, or if it is not a member of a sequence.
|
| Methods inherited from scala.util.parsing.input.Positional | |
| scala.util.parsing.input.Positional.setPos |
| Methods inherited from scala.Product | |
| scala.Product.productElement (abstract), scala.Product.productArity (abstract), scala.Product.productPrefix |
| Methods inherited from AnyRef | |
| getClass, hashCode, equals, clone, toString, notify, notifyAll, wait, wait, wait, finalize, ==, !=, eq, ne, synchronized |
| Methods inherited from Any | |
| ==, !=, isInstanceOf, asInstanceOf |
| Value Details |
var
parent : Attributable
Option or
Seq nodes.
var
_next : Attributable
var
index : Int
| Method Details |
def
parent[T] : T
def
isRoot : Boolean
def
prev : Attributable
def
next : Attributable
def
isFirst : Boolean
def
isLast : Boolean
def
children : scala.Iterator[Attributable]
Seq[_])
and optional children (Option[_]). In the case of sequences and
options, their contents are processed and any immediate Attributable
contents are included in the sequence.final
def
->[T](attr : (Attributable) => T) : T
this->attribute is equivalent to attribute(this).|
kiama 0.9.0 API
|
|