CaseBlock

/**
* A `switch`-`case` block.
*/

Inherit from Statement

Primary key: id: int

schema CaseBlock extends Statement {
  @primary id: int
}

CaseBlock::getSymbol

/**
* Gets the symbol associated with this node.
*/
pub fn getSymbol(self: CaseBlock) -> Symbol;

CaseBlock::getAnAncestorEnclosingFunction

/**
* Gets an ancestor enclosing function of it
*/
pub fn getAnAncestorEnclosingFunction(self: CaseBlock) -> *FunctionLikeDeclaration;

CaseBlock::getIndex

pub fn getIndex(self: CaseBlock) -> int;

CaseBlock::getParentOid

/**
* Gets the parent oid of this node.
*/
pub fn getParentOid(self: CaseBlock) -> int;

CaseBlock::getRelativePath

/**
* Gets the relative path of this node.
*/
pub fn getRelativePath(self: CaseBlock) -> string;

CaseBlock::getEndColumnNumber

pub fn getEndColumnNumber(self: CaseBlock) -> int;

CaseBlock::getParent

/**
* Gets the parent node of this node.
*/
pub fn getParent(self: CaseBlock) -> Node;

CaseBlock::getADecorator

/**
* Gets a decorator.
*/
pub fn getADecorator(self: CaseBlock) -> *Decorator;

CaseBlock::getAComment

/**
* Gets the comments related to it
*/
pub fn getAComment(self: CaseBlock) -> *Comment;

CaseBlock::getDecorator

/**
* Gets the `i`th decorator.
*/
pub fn getDecorator(self: CaseBlock, i: int) -> Decorator;

CaseBlock::getText

/**
* Gets the text of this node.
*/
pub fn getText(self: CaseBlock) -> string;

CaseBlock::getModifier

/**
* Gets the `i`th modifier.
*/
pub fn getModifier(self: CaseBlock, i: int) -> Modifier;

CaseBlock::getDefaultClause

/**
* Gets the `default` clause of this `switch`-`case` block.
*/
pub fn getDefaultClause(self: CaseBlock) -> DefaultClause;

CaseBlock::getRoot

/**
* Gets the root top-level of this node. 
*/
pub fn getRoot(self: CaseBlock) -> TopLevelDO;

CaseBlock::getLastChild

/**
* Gets the last child of this node parent.
*/
pub fn getLastChild(self: CaseBlock) -> Node;

CaseBlock::getACaseOrDefault

/**
* Gets a CaseClause or DefaultClause of this CaseBlock.
*/
pub fn getACaseOrDefault(self: CaseBlock) -> *Statement;

CaseBlock::__all__

Data constraint method.

pub fn __all__(db: JavascriptDB) -> *CaseBlock;

CaseBlock::getLocation

/**
* Gets the location of this node.
*/
pub fn getLocation(self: CaseBlock) -> Location;

CaseBlock::getADescendantByLevel

/**
* Gets a descendant of this node by the level of the hierarchy.
*
* @param level: the number of levels to go up in the hierarchy.
*/
pub fn getADescendantByLevel(self: CaseBlock, level: int) -> *Node;

CaseBlock::getEnclosingFunction

/**
* Gets the enclosing function of it
*/
pub fn getEnclosingFunction(self: CaseBlock) -> FunctionLikeDeclaration;

CaseBlock::getADescendant

/**
* Gets a descendant of this node. 
*/
pub fn getADescendant(self: CaseBlock) -> *Node;

CaseBlock::getKind

/**
* Get the syntax kind of this node
*/
pub fn getKind(self: CaseBlock) -> int;

CaseBlock::getAModifier

/**
* Gets a modifier.
*/
pub fn getAModifier(self: CaseBlock) -> *Modifier;

CaseBlock::getCaseClause

/**
* Gets the `i`th `case` clause of this `switch`-`case` block.
* index starts from 0.
*/
pub fn getCaseClause(self: CaseBlock, i: int) -> CaseClause;

CaseBlock::getAnAncestor

/**
* Gets an ancestor of this node. 
*/
pub fn getAnAncestor(self: CaseBlock) -> *Node;

CaseBlock::haveDefaultClause

/**
* Determine whether this CaseBlock has a DefaultClause.
*/
pub fn haveDefaultClause(self: CaseBlock) -> bool;

CaseBlock::getChild

/**
* Gets the `i`th child of this node.
*/
pub fn getChild(self: CaseBlock, i: int) -> Node;

CaseBlock::getChildCount

/**
* Gets the number of child nodes.
*/
pub fn getChildCount(self: CaseBlock) -> int;

CaseBlock::getACaseClause

/**
* Gets a `case` clause of this `switch`-`case` block.
*/
pub fn getACaseClause(self: CaseBlock) -> *CaseClause;

CaseBlock::getAChild

/**
* Gets a child node of this node.
*/
pub fn getAChild(self: CaseBlock) -> *Node;

CaseBlock::getStartColumnNumber

pub fn getStartColumnNumber(self: CaseBlock) -> int;

CaseBlock::getStartLineNumber

pub fn getStartLineNumber(self: CaseBlock) -> int;

CaseBlock::getEndLineNumber

pub fn getEndLineNumber(self: CaseBlock) -> int;

CaseBlock::getATrailingComment

/**
* Gets the trailing comments of it
*/
pub fn getATrailingComment(self: CaseBlock) -> *Comment;

CaseBlock::getCaseClauseCount

/**
* Gets the CaseClause count of this CaseBlock.
*/
pub fn getCaseClauseCount(self: CaseBlock) -> int;

CaseBlock::getAnAncestorByLevel

/**
* Gets an ancestor of this node by the level of the hierarchy.
*
* @param level: the number of levels to go up in the hierarchy.
*/
pub fn getAnAncestorByLevel(self: CaseBlock, level: int) -> Node;

CaseBlock::getALeadingComment

/**
* Gets the leading comments of it
*/
pub fn getALeadingComment(self: CaseBlock) -> *Comment;

CaseBlock::getFile

/**
* Gets the file of this node.
*/
pub fn getFile(self: CaseBlock) -> File;