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
*/
- Parameter
self
:CaseBlock
- Return
*FunctionLikeDeclaration
pub fn getAnAncestorEnclosingFunction(self: CaseBlock) -> *FunctionLikeDeclaration;
CaseBlock::getIndex
- Parameter
self
:CaseBlock
- Return
int
pub fn getIndex(self: CaseBlock) -> int;
CaseBlock::getParentOid
/**
* Gets the parent oid of this node.
*/
- Parameter
self
:CaseBlock
- Return
int
pub fn getParentOid(self: CaseBlock) -> int;
CaseBlock::getRelativePath
/**
* Gets the relative path of this node.
*/
- Parameter
self
:CaseBlock
- Return
string
pub fn getRelativePath(self: CaseBlock) -> string;
CaseBlock::getEndColumnNumber
- Parameter
self
:CaseBlock
- Return
int
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.
*/
- Parameter
self
:CaseBlock
- Return
*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.
*/
- Parameter
self
:CaseBlock
- Return
string
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.
*/
- Parameter
self
:CaseBlock
- Return
DefaultClause
pub fn getDefaultClause(self: CaseBlock) -> DefaultClause;
CaseBlock::getRoot
/**
* Gets the root top-level of this node.
*/
- Parameter
self
:CaseBlock
- Return
TopLevelDO
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.
*/
- Parameter
self
:CaseBlock
- Return
*Statement
pub fn getACaseOrDefault(self: CaseBlock) -> *Statement;
CaseBlock::__all__
Data constraint method.
- Parameter
db
:JavascriptDB
- Return
*CaseBlock
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
*/
- Parameter
self
:CaseBlock
- Return
FunctionLikeDeclaration
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
*/
- Parameter
self
:CaseBlock
- Return
int
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.
*/
- Parameter
self
:CaseBlock
- Parameter
i
:int
- Return
CaseClause
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.
*/
- Parameter
self
:CaseBlock
- Return
bool
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.
*/
- Parameter
self
:CaseBlock
- Return
int
pub fn getChildCount(self: CaseBlock) -> int;
CaseBlock::getACaseClause
/**
* Gets a `case` clause of this `switch`-`case` block.
*/
- Parameter
self
:CaseBlock
- Return
*CaseClause
pub fn getACaseClause(self: CaseBlock) -> *CaseClause;
CaseBlock::getAChild
/**
* Gets a child node of this node.
*/
pub fn getAChild(self: CaseBlock) -> *Node;
CaseBlock::getStartColumnNumber
- Parameter
self
:CaseBlock
- Return
int
pub fn getStartColumnNumber(self: CaseBlock) -> int;
CaseBlock::getStartLineNumber
- Parameter
self
:CaseBlock
- Return
int
pub fn getStartLineNumber(self: CaseBlock) -> int;
CaseBlock::getEndLineNumber
- Parameter
self
:CaseBlock
- Return
int
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.
*/
- Parameter
self
:CaseBlock
- Return
int
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;