Packages

package model

Provides base classes to model HAST nodes for Stack Overflow artifacts.

Overview

Every note of the HAST implements the HASTNode trait.

Depending on the specific fragment, nodes implement traits in different packages. For example:

Special nodes are used for various purposes, and are contained in this package:

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. model
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. trait CommentNode extends ParseTreeNode with EmbeddedContentsProvider

    A comment node.

    A comment node.

    This common trait is used to hold comments, which are not normally considered as HAST nodes, but they are included for additional analyses (e.g. the ones involving documentation or natural language). It may provide embedded contents, e.g., documentation contents, or unstructured data.

  2. trait EmbeddedContentsNode extends HASTNode

    Represents the embedded contents of a node, that is, a sequence of H-AST nodes representing the structured contents of the node itself.

  3. trait EmbeddedContentsProvider extends AnyRef

    Represents a H-AST node that optionally contains some embedded contents.

  4. case class GenericEmbeddedContentsNode (nodes: Seq[HASTNode]) extends HASTNode with EmbeddedContentsNode with Product with Serializable

    A generic implementation for embedded contents, where each node can be any type of HAST node.

  5. trait HASTNode extends Product with JsonSerializable

    A node of the heterogeneous AST node.

  6. case class HASTNodeSequence (fragments: Seq[HASTNode]) extends HASTNode with Product with Serializable

    A simple HAST node representing a sequence of fragments.

    A simple HAST node representing a sequence of fragments.

    fragments

    a sequence of HAST nodes.

  7. trait IslandParserResult extends AnyRef

    A generic trait for results of Island Parsing.

  8. trait JsonSerializable extends AnyRef

    A tagger trait for case classes which can be serialized to JSON.

  9. case class PTIdentifierNode (valueRep: String) extends ParseTreeNode with ParseTreeToCodeImplementation with Product with Serializable

    A parse tree terminal node for identifiers.

  10. case class PTKeywordNode (valueRep: String) extends ParseTreeNode with ParseTreeToCodeImplementation with Product with Serializable

    A parse tree terminal node for keywords.

  11. case class PTLiteralNode (valueRep: String) extends ParseTreeNode with ParseTreeToCodeImplementation with Product with Serializable

    A parse tree terminal node for literals.

  12. case class PTModifierNode (valueRep: String) extends ParseTreeNode with ParseTreeToCodeImplementation with Product with Serializable

    A parse tree terminal node for modifier keywords (e.g., public).

  13. case class PTOperatorNode (valueRep: String) extends ParseTreeNode with ParseTreeToCodeImplementation with Product with Serializable

    A parse tree terminal node for operators.

  14. case class PTSeparatorNode (valueRep: String) extends ParseTreeNode with ParseTreeToCodeImplementation with Product with Serializable

    A parse tree terminal node for separators (e.g., commas).

  15. case class PTWaterNode (valueRep: String) extends ParseTreeNode with ParseTreeToCodeImplementation with Product with Serializable

    A parse tree terminal node that represents water in the island languages.

  16. case class ParseTreeInternalNode (children: Seq[ParseTreeNode]) extends ParseTreeNode with Product with Serializable

    An internal node of the parse tree (i.e., a node with children).

    An internal node of the parse tree (i.e., a node with children).

    children

    the children of the internal node.

  17. trait ParseTreeNode extends AnyRef

    A node in the parse tree.

  18. trait ParseTreeToCodeImplementation extends AnyRef

    A trait providing a default implementation for terminal nodes in the parse tree.

  19. case class StructuredFragmentResult (tree: Tree[HASTNode]) extends IslandParserResult with Product with Serializable

    A structured fragment result, that is, a parsing result that contains some fragment of a structured language (e.g.

    A structured fragment result, that is, a parsing result that contains some fragment of a structured language (e.g. code or markup languages like JSON).

  20. trait TestingRepresentation extends AnyRef

    Common trait for code conversion, generally used for testing purposes.

  21. case class TextFragmentNode (text: String) extends ASTTerminalNode with BlockStatementNode with MemberDeclarationNode with JavadocASTNode with Product with Serializable

    A text fragment node.

    A text fragment node.

    To support island with lakes, this is also a block statement and a member declaration node, but the corresponding methods have no effect.

    text

    the text of the fragment

  22. case class TextFragmentResult (tree: Tree[TextFragmentNode]) extends IslandParserResult with Product with Serializable

    A text fragment result, that is, a parsing result that mainly contains a textual fragment.

  23. case class Tree [+NodeType <: HASTNode](ast: NodeType, parseTree: ParseTreeNode) extends Product with Serializable

    Represents a combination of an HAST of a given type and the corresponding parse tree.

    Represents a combination of an HAST of a given type and the corresponding parse tree.

    NodeType

    The type of the HAST.

  24. case class WhiteSpaceNode (text: String) extends ParseTreeNode with Product with Serializable

    A parse tree terminal node representing white space.

Value Members

  1. object Implicits

    If imported, allows to generate code from a HASTNode.

Inherited from AnyRef

Inherited from Any

Ungrouped