@specs-feup/clava
Version:
A C/C++ source-to-source compiler written in Typescript
1,214 lines (1,213 loc) • 104 kB
JavaScript
///////////////////////////////////////////////////
// This file is generated by build-interfaces.js //
///////////////////////////////////////////////////
/* eslint-disable @typescript-eslint/ban-types */
/* eslint-disable @typescript-eslint/no-explicit-any */
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
/* eslint-disable @typescript-eslint/no-unsafe-call */
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
/* eslint-disable @typescript-eslint/no-unsafe-return */
/* eslint-disable @typescript-eslint/no-duplicate-type-constituents */
import { LaraJoinPoint, registerJoinpointMapper, wrapJoinPoint, unwrapJoinPoint, } from "@specs-feup/lara/api/LaraJoinPoint.js";
export class Joinpoint extends LaraJoinPoint {
/**
* @internal
*/
static _defaultAttributeInfo = {
name: null,
};
/**
* String with a dump of the AST representation starting from this node. This representation corresponds to the internal Java representation of the ClavaAst, where the node names correspond to Java classes. To get an equivalent representation with join point names, use the attribute 'dump'
*/
get ast() { return wrapJoinPoint(this._javaObject.getAst()); }
/**
* Returns an array with the children of the node, considering null nodes
*/
get astChildren() { return wrapJoinPoint(this._javaObject.getAstChildren()); }
/**
* String that uniquely identifies this node
*/
get astId() { return wrapJoinPoint(this._javaObject.getAstId()); }
/**
* The name of the Java class of this node, which is similar to the equivalent node in Clang AST
*/
get astName() { return wrapJoinPoint(this._javaObject.getAstName()); }
/**
* Returns the number of children of the node, considering null nodes
*/
get astNumChildren() { return wrapJoinPoint(this._javaObject.getAstNumChildren()); }
/**
* The bit width of the type returned by this join point, in relation to the definitions of its Translation Unit, or undefined if there is no type or bitwidth defined, or if the join point is not in a TranslationUnit
*/
get bitWidth() { return wrapJoinPoint(this._javaObject.getBitWidth()); }
/**
* String list of the names of the join points that form a path from the root to this node
*/
get chain() { return wrapJoinPoint(this._javaObject.getChain()); }
/**
* Returns an array with the children of the node, ignoring null nodes
*/
get children() { return wrapJoinPoint(this._javaObject.getChildren()); }
/**
* String with the code represented by this node
*/
get code() { return wrapJoinPoint(this._javaObject.getCode()); }
/**
* The starting column of the current node in the original code
*/
get column() { return wrapJoinPoint(this._javaObject.getColumn()); }
/**
* Returns the node that declares the scope of this node
*/
get currentRegion() { return wrapJoinPoint(this._javaObject.getCurrentRegion()); }
/**
* JS object associated with this node, containing parsed data of #pragma clava data when the node can be a target of pragmas. This is a special object, managed internally, and cannot be reassigned, to change its contents requires using key-value pairs. If the node can be the target of a pragma, the information stored in this object is persisted between rebuilds.
*/
get data() { const data = this._javaObject.getData(); return data ? JSON.parse(data) : data; }
/**
* JS object associated with this node, containing parsed data of #pragma clava data when the node can be a target of pragmas. This is a special object, managed internally, and cannot be reassigned, to change its contents requires using key-value pairs. If the node can be the target of a pragma, the information stored in this object is persisted between rebuilds.
*/
set data(value) { this._javaObject.setData(JSON.stringify(value)); }
/**
* The depth of this join point in the AST. If it is the root join point returns 0, if it is a child of the root node returns 1, etc.
*/
get depth() { return wrapJoinPoint(this._javaObject.getDepth()); }
/**
* Retrieves all descendants of the join point
*/
get descendants() { return wrapJoinPoint(this._javaObject.getDescendants()); }
/**
* The ending column of the current node in the original code
*/
get endColumn() { return wrapJoinPoint(this._javaObject.getEndColumn()); }
/**
* The ending line of the current node in the original code
*/
get endLine() { return wrapJoinPoint(this._javaObject.getEndLine()); }
/**
* The name of the file where the code of this node is located, if available
*/
get filename() { return wrapJoinPoint(this._javaObject.getFilename()); }
/**
* The complete path to the file where the code of this node comes from
*/
get filepath() { return wrapJoinPoint(this._javaObject.getFilepath()); }
/**
* Returns the first child of this node, or undefined if it has no child
*/
get firstChild() { return wrapJoinPoint(this._javaObject.getFirstChild()); }
/**
* Returns the first child of this node, or undefined if it has no child
*/
set firstChild(value) { this._javaObject.setFirstChild(unwrapJoinPoint(value)); }
/**
* True if the node has children, false otherwise
*/
get hasChildren() { return wrapJoinPoint(this._javaObject.getHasChildren()); }
/**
* True if this node has a parent
*/
get hasParent() { return wrapJoinPoint(this._javaObject.getHasParent()); }
/**
* True, if the join point has a type
*/
get hasType() { return wrapJoinPoint(this._javaObject.getHasType()); }
/**
* Returns comments that are not explicitly in the AST, but embedded in other nodes
*/
get inlineComments() { return wrapJoinPoint(this._javaObject.getInlineComments()); }
/**
* Returns comments that are not explicitly in the AST, but embedded in other nodes
*/
set inlineComments(value) { this._javaObject.setInlineComments(unwrapJoinPoint(value)); }
/**
* True if this is a Cilk node (i.e., cilk_spawn, cilk_sync or cilk_for)
*/
get isCilk() { return wrapJoinPoint(this._javaObject.getIsCilk()); }
/**
* True, if the join point is part of a system header file
*/
get isInSystemHeader() { return wrapJoinPoint(this._javaObject.getIsInSystemHeader()); }
/**
* True, if the join point is inside a header (e.g., if condition, for, while)
*/
get isInsideHeader() { return wrapJoinPoint(this._javaObject.getIsInsideHeader()); }
/**
* True, if the join point is inside a loop header (e.g., for, while)
*/
get isInsideLoopHeader() { return wrapJoinPoint(this._javaObject.getIsInsideLoopHeader()); }
/**
* True if any descendant or the node itself was defined as a macro
*/
get isMacro() { return wrapJoinPoint(this._javaObject.getIsMacro()); }
/**
* The names of the Java fields of this node. Can be used as key of the attribute 'javaValue'
*
* @deprecated used attribute 'keys' instead, together with 'getValue'
*/
get javaFields() { return wrapJoinPoint(this._javaObject.getJavaFields()); }
/**
* Id that is based on the position of the node in the code, and should remain stable between compilations (warning: only a few nodes - file, function, loop - currently support it)
*/
get jpId() { return wrapJoinPoint(this._javaObject.getJpId()); }
/**
* A list of the properties currently supported by this node. Can be used as parameter of the attribute 'getValue'
*/
get keys() { return wrapJoinPoint(this._javaObject.getKeys()); }
/**
* Returns the last child of this node, or undefined if it has no child
*/
get lastChild() { return wrapJoinPoint(this._javaObject.getLastChild()); }
/**
* Returns the last child of this node, or undefined if it has no child
*/
set lastChild(value) { this._javaObject.setLastChild(unwrapJoinPoint(value)); }
/**
* Returns the node that came before this node, or undefined if there is none
*/
get leftJp() { return wrapJoinPoint(this._javaObject.getLeftJp()); }
/**
* The starting line of the current node in the original code
*/
get line() { return wrapJoinPoint(this._javaObject.getLine()); }
/**
* A string with information about the file and code position of this node, if available
*/
get location() { return wrapJoinPoint(this._javaObject.getLocation()); }
/**
* Returns the number of children of the node, ignoring null nodes
*/
get numChildren() { return wrapJoinPoint(this._javaObject.getNumChildren()); }
/**
* If this join point was not originally from the parsed AST, returns the first join point of the original AST that contributed to its origin
*/
get originNode() { return wrapJoinPoint(this._javaObject.getOriginNode()); }
/**
* Returns the parent node in the AST, or undefined if it is the root node
*/
get parent() { return wrapJoinPoint(this._javaObject.getParent()); }
/**
* Returns the node that declares the scope that is a parent of the scope of this node
*/
get parentRegion() { return wrapJoinPoint(this._javaObject.getParentRegion()); }
/**
* The pragmas associated with this node
*/
get pragmas() { return wrapJoinPoint(this._javaObject.getPragmas()); }
/**
* Returns the node that comes after this node, or undefined if there is none
*/
get rightJp() { return wrapJoinPoint(this._javaObject.getRightJp()); }
/**
* Returns the 'program' joinpoint
*/
get root() { return wrapJoinPoint(this._javaObject.getRoot()); }
/**
* The nodes of the scope of the current join point. If this node has a body (e.g., loop, function) corresponds to the children of the body. Otherwise, returns an empty array
*/
get scopeNodes() { return wrapJoinPoint(this._javaObject.getScopeNodes()); }
/**
* Returns an array with the siblings that came before this node
*/
get siblingsLeft() { return wrapJoinPoint(this._javaObject.getSiblingsLeft()); }
/**
* Returns an array with the siblings that come after this node
*/
get siblingsRight() { return wrapJoinPoint(this._javaObject.getSiblingsRight()); }
/**
* Converts this join point to a statement, or returns undefined if it was not possible
*/
get stmt() { return wrapJoinPoint(this._javaObject.getStmt()); }
get type() { return wrapJoinPoint(this._javaObject.getType()); }
set type(value) { this._javaObject.setType(unwrapJoinPoint(value)); }
/**
* True, if this node is a Java instance of the given name, which corresponds to a simple Java class name of an AST node. For an equivalent function for join point names, use 'instanceOf(joinPointName)'
*/
astIsInstance(className) { return wrapJoinPoint(this._javaObject.astIsInstance(unwrapJoinPoint(className))); }
/**
* True if the given node is a descendant of this node
*/
contains(jp) { return wrapJoinPoint(this._javaObject.contains(unwrapJoinPoint(jp))); }
/**
* Looks for an ancestor joinpoint name, walking back on the AST
*/
getAncestor(type) { return wrapJoinPoint(this._javaObject.getAncestor(unwrapJoinPoint(type))); }
/**
* @deprecated Looks for an ancestor AST name, walking back on the AST
*/
getAstAncestor(type) { return wrapJoinPoint(this._javaObject.getAstAncestor(unwrapJoinPoint(type))); }
/**
* Returns the child of the node at the given index, considering null nodes
*/
getAstChild(index) { return wrapJoinPoint(this._javaObject.getAstChild(unwrapJoinPoint(index))); }
/**
* Looks for an ancestor joinpoint name, walking back on the joinpoint chain
*/
getChainAncestor(type) { return wrapJoinPoint(this._javaObject.getChainAncestor(unwrapJoinPoint(type))); }
/**
* Returns the child of the node at the given index, ignoring null nodes
*/
getChild(index) { return wrapJoinPoint(this._javaObject.getChild(unwrapJoinPoint(index))); }
/**
* Retrieves the descendants of the given type
*/
getDescendants(type) { return wrapJoinPoint(this._javaObject.getDescendants(unwrapJoinPoint(type))); }
/**
* Retrieves the descendants of the given type, including the node itself
*/
getDescendantsAndSelf(type) { return wrapJoinPoint(this._javaObject.getDescendantsAndSelf(unwrapJoinPoint(type))); }
/**
* Looks in the descendants for the first node of the given type
*/
getFirstJp(type) { return wrapJoinPoint(this._javaObject.getFirstJp(unwrapJoinPoint(type))); }
/**
* String with the full Java class name of the type of the Java field with the provided name
*/
getJavaFieldType(fieldName) { return wrapJoinPoint(this._javaObject.getJavaFieldType(unwrapJoinPoint(fieldName))); }
/**
* Java Class instance with the type of the given key
*/
getKeyType(key) { return wrapJoinPoint(this._javaObject.getKeyType(unwrapJoinPoint(key))); }
/**
* Retrives values that have been associated to nodes of the AST with 'setUserField'
*/
getUserField(fieldName) { return wrapJoinPoint(this._javaObject.getUserField(unwrapJoinPoint(fieldName))); }
/**
* The value associated with the given property key
*/
getValue(key) { return wrapJoinPoint(this._javaObject.getValue(unwrapJoinPoint(key))); }
/**
* True, if the given join point or AST node is the same (== test) as the current join point AST node
*/
hasNode(nodeOrJp) { return wrapJoinPoint(this._javaObject.hasNode(unwrapJoinPoint(nodeOrJp))); }
/**
* Performs a copy of the node and its children, but not of the nodes in its fields
*/
copy() { return wrapJoinPoint(this._javaObject.copy()); }
/**
* Clears all properties from the .data object
*/
dataClear() { return wrapJoinPoint(this._javaObject.dataClear()); }
/**
* Performs a copy of the node and its children, including the nodes in their fields (only the first level of field nodes, this function is not recursive)
*/
deepCopy() { return wrapJoinPoint(this._javaObject.deepCopy()); }
/**
* Removes the node associated to this joinpoint from the AST
*/
detach() { return wrapJoinPoint(this._javaObject.detach()); }
/**
* Inserts the given join point after this join point
*/
insertAfter(p1) { return wrapJoinPoint(this._javaObject.insertAfter(unwrapJoinPoint(p1))); }
/**
* Inserts the given join point before this join point
*/
insertBefore(p1) { return wrapJoinPoint(this._javaObject.insertBefore(unwrapJoinPoint(p1))); }
/**
* Adds a message that will be printed to the user after weaving finishes. Identical messages are removed
*/
messageToUser(message) { return wrapJoinPoint(this._javaObject.messageToUser(unwrapJoinPoint(message))); }
/**
* Removes the children of this node
*/
removeChildren() { return wrapJoinPoint(this._javaObject.removeChildren()); }
/**
* Replaces this node with the given node
*/
replaceWith(p1) { return wrapJoinPoint(this._javaObject.replaceWith(unwrapJoinPoint(p1))); }
/**
* Overload which accepts a list of strings
*/
replaceWithStrings(node) { return wrapJoinPoint(this._javaObject.replaceWithStrings(unwrapJoinPoint(node))); }
/**
* Setting data directly is not supported, this action just emits a warning and does nothing
*/
setData(source) { return wrapJoinPoint(this._javaObject.setData(JSON.stringify(source))); }
/**
* Replaces the first child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.
*/
setFirstChild(node) { return wrapJoinPoint(this._javaObject.setFirstChild(unwrapJoinPoint(node))); }
/**
* Sets the commented that are embedded in a node
*/
setInlineComments(p1) { return wrapJoinPoint(this._javaObject.setInlineComments(unwrapJoinPoint(p1))); }
/**
* Replaces the last child, or inserts the join point if no child is present. Returns the replaced child, or undefined if there was no child present.
*/
setLastChild(node) { return wrapJoinPoint(this._javaObject.setLastChild(unwrapJoinPoint(node))); }
/**
* Sets the type of a node, if it has a type
*/
setType(type) { return wrapJoinPoint(this._javaObject.setType(unwrapJoinPoint(type))); }
/**
* Associates arbitrary values to nodes of the AST
*/
setUserField(p1, p2) { return wrapJoinPoint(this._javaObject.setUserField(unwrapJoinPoint(p1), unwrapJoinPoint(p2))); }
/**
* Sets the value associated with the given property key
*/
setValue(key, value) { return wrapJoinPoint(this._javaObject.setValue(unwrapJoinPoint(key), unwrapJoinPoint(value))); }
/**
* Replaces this join point with a comment with the same contents as .code
*/
toComment(prefix = "", suffix = "") { return wrapJoinPoint(this._javaObject.toComment(unwrapJoinPoint(prefix), unwrapJoinPoint(suffix))); }
}
export class Attribute extends Joinpoint {
/**
* @internal
*/
static _defaultAttributeInfo = {
name: null,
};
get kind() { return wrapJoinPoint(this._javaObject.getKind()); }
}
/**
* Utility joinpoint, to represent certain problems when generating join points
*/
export class ClavaException extends Joinpoint {
/**
* @internal
*/
static _defaultAttributeInfo = {
name: null,
};
get exception() { return wrapJoinPoint(this._javaObject.getException()); }
get exceptionType() { return wrapJoinPoint(this._javaObject.getExceptionType()); }
get message() { return wrapJoinPoint(this._javaObject.getMessage()); }
}
export class Comment extends Joinpoint {
/**
* @internal
*/
static _defaultAttributeInfo = {
name: null,
};
get text() { return wrapJoinPoint(this._javaObject.getText()); }
set text(value) { this._javaObject.setText(unwrapJoinPoint(value)); }
setText(text) { return wrapJoinPoint(this._javaObject.setText(unwrapJoinPoint(text))); }
}
/**
* Represents one declaration (e.g., int foo(){return 0;}) or definition (e.g., int foo();) in the code
*/
export class Decl extends Joinpoint {
/**
* @internal
*/
static _defaultAttributeInfo = {
name: null,
};
/**
* The attributes (e.g. Pure, CUDAGlobal) associated to this decl
*/
get attrs() { return wrapJoinPoint(this._javaObject.getAttrs()); }
}
/**
* Utility joinpoint, to represent empty nodes when directly accessing the tree
*/
export class Empty extends Joinpoint {
/**
* @internal
*/
static _defaultAttributeInfo = {
name: null,
};
}
export class Expression extends Joinpoint {
/**
* @internal
*/
static _defaultAttributeInfo = {
name: null,
};
/**
* A 'decl' join point that represents the declaration associated with this expression, or undefined if there is none
*/
get decl() { return wrapJoinPoint(this._javaObject.getDecl()); }
/**
* Returns a cast joinpoint if this expression has an associated implicit cast, undefined otherwise
*/
get implicitCast() { return wrapJoinPoint(this._javaObject.getImplicitCast()); }
/**
* True if the expression is part of an argument of a function call
*/
get isFunctionArgument() { return wrapJoinPoint(this._javaObject.getIsFunctionArgument()); }
get use() { return wrapJoinPoint(this._javaObject.getUse()); }
get vardecl() { return wrapJoinPoint(this._javaObject.getVardecl()); }
}
/**
* Represents a source file (.c, .cpp., .cl, etc)
*/
export class FileJp extends Joinpoint {
/**
* @internal
*/
static _defaultAttributeInfo = {
name: "name",
};
/**
* The path to the source folder that was given as the base folder of this file
*/
get baseSourcePath() { return wrapJoinPoint(this._javaObject.getBaseSourcePath()); }
/**
* The output of the parser if there were errors during parsing
*/
get errorOutput() { return wrapJoinPoint(this._javaObject.getErrorOutput()); }
/**
* A Java file to the file that originated this translation unit
*/
get file() { return wrapJoinPoint(this._javaObject.getFile()); }
/**
* True if this file contains a 'main' method
*/
get hasMain() { return wrapJoinPoint(this._javaObject.getHasMain()); }
/**
* True if there were errors during parsing
*/
get hasParsingErrors() { return wrapJoinPoint(this._javaObject.getHasParsingErrors()); }
/**
* The includes of this file
*/
get includes() { return wrapJoinPoint(this._javaObject.getIncludes()); }
/**
* True if this file is considered a C++ file
*/
get isCxx() { return wrapJoinPoint(this._javaObject.getIsCxx()); }
/**
* True if this file is considered a header file
*/
get isHeader() { return wrapJoinPoint(this._javaObject.getIsHeader()); }
/**
* True if this file is an OpenCL filetype
*/
get isOpenCL() { return wrapJoinPoint(this._javaObject.getIsOpenCL()); }
/**
* The name of the file
*/
get name() { return wrapJoinPoint(this._javaObject.getName()); }
/**
* The name of the file
*/
set name(value) { this._javaObject.setName(unwrapJoinPoint(value)); }
/**
* The folder of the source file
*/
get path() { return wrapJoinPoint(this._javaObject.getPath()); }
/**
* The path to the file relative to the base source path
*/
get relativeFilepath() { return wrapJoinPoint(this._javaObject.getRelativeFilepath()); }
/**
* The path to the folder of the source file relative to the base source path
*/
get relativeFolderpath() { return wrapJoinPoint(this._javaObject.getRelativeFolderpath()); }
/**
* The path to the folder of the source file relative to the base source path
*/
set relativeFolderpath(value) { this._javaObject.setRelativeFolderpath(unwrapJoinPoint(value)); }
/**
* The name of the source folder of this file, or undefined if it has none
*/
get sourceFoldername() { return wrapJoinPoint(this._javaObject.getSourceFoldername()); }
/**
* The complete path to the file that will be generated by the weaver, given a destination folder
*/
getDestinationFilepath(destinationFolderpath) { return wrapJoinPoint(this._javaObject.getDestinationFilepath(unwrapJoinPoint(destinationFolderpath))); }
/**
* Adds a C include to the current file. If the file already has the include, it does nothing
*/
addCInclude(name, isAngled = false) { return wrapJoinPoint(this._javaObject.addCInclude(unwrapJoinPoint(name), unwrapJoinPoint(isAngled))); }
/**
* Adds a function to the file that returns void and has no parameters
*/
addFunction(name) { return wrapJoinPoint(this._javaObject.addFunction(unwrapJoinPoint(name))); }
/**
* Adds a global variable to this file
*/
addGlobal(name, type, initValue) { return wrapJoinPoint(this._javaObject.addGlobal(unwrapJoinPoint(name), unwrapJoinPoint(type), unwrapJoinPoint(initValue))); }
/**
* Adds an include to the current file. If the file already has the include, it does nothing
*/
addInclude(name, isAngled = false) { return wrapJoinPoint(this._javaObject.addInclude(unwrapJoinPoint(name), unwrapJoinPoint(isAngled))); }
/**
* Overload of addInclude which accepts a join point
*/
addIncludeJp(jp) { return wrapJoinPoint(this._javaObject.addIncludeJp(unwrapJoinPoint(jp))); }
/**
* Adds the node in the join point to the start of the file
*/
insertBegin(p1) { return wrapJoinPoint(this._javaObject.insertBegin(unwrapJoinPoint(p1))); }
/**
* Adds the node in the join point to the end of the file
*/
insertEnd(p1) { return wrapJoinPoint(this._javaObject.insertEnd(unwrapJoinPoint(p1))); }
/**
* Recompiles only this file, returns a join point to the new recompiled file, or throws an exception if a problem happens
*/
rebuild() { return wrapJoinPoint(this._javaObject.rebuild()); }
/**
* Recompiles only this file, returns a join point to the new recompiled file, or returns a clavaException join point if a problem happens
*/
rebuildTry() { return wrapJoinPoint(this._javaObject.rebuildTry()); }
/**
* Changes the name of the file
*/
setName(filename) { return wrapJoinPoint(this._javaObject.setName(unwrapJoinPoint(filename))); }
/**
* Sets the path to the folder of the source file relative to the base source path
*/
setRelativeFolderpath(path) { return wrapJoinPoint(this._javaObject.setRelativeFolderpath(unwrapJoinPoint(path))); }
/**
* Writes the code of this file to a given folder
*/
write(destinationFoldername) { return wrapJoinPoint(this._javaObject.write(unwrapJoinPoint(destinationFoldername))); }
}
export class ImplicitValue extends Expression {
/**
* @internal
*/
static _defaultAttributeInfo = {
name: null,
};
}
/**
* Represents an include directive (e.g., #include <stdio.h>)
*/
export class Include extends Decl {
/**
* @internal
*/
static _defaultAttributeInfo = {
name: "name",
};
/**
* True if this is an angled include (i.e., system include)
*/
get isAngled() { return wrapJoinPoint(this._javaObject.getIsAngled()); }
/**
* The name of the include
*/
get name() { return wrapJoinPoint(this._javaObject.getName()); }
/**
* The path to the folder of the source file of the include, relative to the name of the include
*/
get relativeFolderpath() { return wrapJoinPoint(this._javaObject.getRelativeFolderpath()); }
}
export class InitList extends Expression {
/**
* @internal
*/
static _defaultAttributeInfo = {
name: null,
};
/**
* [May be undefined] If this initializer list initializes an array with more elements than there are initializers in the list, specifies an expression to be used for value initialization of the rest of the elements
*/
get arrayFiller() { return wrapJoinPoint(this._javaObject.getArrayFiller()); }
}
export class Literal extends Expression {
/**
* @internal
*/
static _defaultAttributeInfo = {
name: null,
};
}
export class MemberAccess extends Expression {
/**
* @internal
*/
static _defaultAttributeInfo = {
name: null,
};
/**
* True if this is a member access that uses arrow (i.e., foo->bar), false if uses dot (i.e., foo.bar)
*/
get arrow() { return wrapJoinPoint(this._javaObject.getArrow()); }
/**
* True if this is a member access that uses arrow (i.e., foo->bar), false if uses dot (i.e., foo.bar)
*/
set arrow(value) { this._javaObject.setArrow(unwrapJoinPoint(value)); }
/**
* Expression of the base of this member access
*/
get base() { return wrapJoinPoint(this._javaObject.getBase()); }
get memberChain() { return wrapJoinPoint(this._javaObject.getMemberChain()); }
get memberChainNames() { return wrapJoinPoint(this._javaObject.getMemberChainNames()); }
get name() { return wrapJoinPoint(this._javaObject.getName()); }
setArrow(isArrow) { return wrapJoinPoint(this._javaObject.setArrow(unwrapJoinPoint(isArrow))); }
}
/**
* Represents a decl with a name
*/
export class NamedDecl extends Decl {
/**
* @internal
*/
static _defaultAttributeInfo = {
name: "name",
};
get isPublic() { return wrapJoinPoint(this._javaObject.getIsPublic()); }
get name() { return wrapJoinPoint(this._javaObject.getName()); }
set name(value) { this._javaObject.setName(unwrapJoinPoint(value)); }
get qualifiedName() { return wrapJoinPoint(this._javaObject.getQualifiedName()); }
set qualifiedName(value) { this._javaObject.setQualifiedName(unwrapJoinPoint(value)); }
get qualifiedPrefix() { return wrapJoinPoint(this._javaObject.getQualifiedPrefix()); }
set qualifiedPrefix(value) { this._javaObject.setQualifiedPrefix(unwrapJoinPoint(value)); }
/**
* Sets the name of this namedDecl
*/
setName(name) { return wrapJoinPoint(this._javaObject.setName(unwrapJoinPoint(name))); }
/**
* Sets the qualified name of this namedDecl (changes both the name and qualified prefix)
*/
setQualifiedName(name) { return wrapJoinPoint(this._javaObject.setQualifiedName(unwrapJoinPoint(name))); }
/**
* Sets the qualified prefix of this namedDecl
*/
setQualifiedPrefix(qualifiedPrefix) { return wrapJoinPoint(this._javaObject.setQualifiedPrefix(unwrapJoinPoint(qualifiedPrefix))); }
}
export class NewExpr extends Expression {
/**
* @internal
*/
static _defaultAttributeInfo = {
name: null,
};
}
export class Op extends Expression {
/**
* @internal
*/
static _defaultAttributeInfo = {
name: null,
};
get isBitwise() { return wrapJoinPoint(this._javaObject.getIsBitwise()); }
/**
* The kind of the operator. If it is a binary operator, can be one of: ptr_mem_d, ptr_mem_i, mul, div, rem, add, sub, shl, shr, cmp, lt, gt, le, ge, eq, ne, and, xor, or, l_and, l_or, assign, mul_assign, div_assign, rem_assign, add_assign, sub_assign, shl_assign, shr_assign, and_assign, xor_assign, or_assign, comma. If it is a unary operator, can be one of: post_inc, post_dec, pre_inc, pre_dec, addr_of, deref, plus, minus, not, l_not, real, imag, extension, cowait.
*/
get kind() { return wrapJoinPoint(this._javaObject.getKind()); }
get operator() { return wrapJoinPoint(this._javaObject.getOperator()); }
}
export class ParenExpr extends Expression {
/**
* @internal
*/
static _defaultAttributeInfo = {
name: null,
};
/**
* Returns the expression inside this parenthesis expression
*/
get subExpr() { return wrapJoinPoint(this._javaObject.getSubExpr()); }
}
/**
* Represents a pragma in the code (e.g., #pragma kernel)
*/
export class Pragma extends Joinpoint {
/**
* @internal
*/
static _defaultAttributeInfo = {
name: "name",
};
/**
* Everything that is after the name of the pragma
*/
get content() { return wrapJoinPoint(this._javaObject.getContent()); }
/**
* Everything that is after the name of the pragma
*/
set content(value) { this._javaObject.setContent(unwrapJoinPoint(value)); }
/**
* The name of the pragma. E.g. for #pragma foo bar, returns 'foo'
*/
get name() { return wrapJoinPoint(this._javaObject.getName()); }
/**
* The name of the pragma. E.g. for #pragma foo bar, returns 'foo'
*/
set name(value) { this._javaObject.setName(unwrapJoinPoint(value)); }
/**
* The first node below the pragma that is not a comment or another pragma. Example of pragma targets are statements and declarations
*/
get target() { return wrapJoinPoint(this._javaObject.getTarget()); }
/**
* All the nodes below the target node, including the target node, up until a pragma with the name given by argument 'endPragma'. If no end pragma is found, returns the same result as if not providing the argument
*/
getTargetNodes(endPragma) { return wrapJoinPoint(this._javaObject.getTargetNodes(unwrapJoinPoint(endPragma))); }
setContent(content) { return wrapJoinPoint(this._javaObject.setContent(unwrapJoinPoint(content))); }
setName(name) { return wrapJoinPoint(this._javaObject.setName(unwrapJoinPoint(name))); }
}
/**
* Represents the complete program and is the top-most joinpoint in the hierarchy
*/
export class Program extends Joinpoint {
/**
* @internal
*/
static _defaultAttributeInfo = {
name: "name",
};
get baseFolder() { return wrapJoinPoint(this._javaObject.getBaseFolder()); }
get defaultFlags() { return wrapJoinPoint(this._javaObject.getDefaultFlags()); }
/**
* Paths to includes that the current program depends on
*/
get extraIncludes() { return wrapJoinPoint(this._javaObject.getExtraIncludes()); }
/**
* Link libraries of external projects the current program depends on
*/
get extraLibs() { return wrapJoinPoint(this._javaObject.getExtraLibs()); }
/**
* Paths to folders of projects that the current program depends on
*/
get extraProjects() { return wrapJoinPoint(this._javaObject.getExtraProjects()); }
/**
* Paths to sources that the current program depends on
*/
get extraSources() { return wrapJoinPoint(this._javaObject.getExtraSources()); }
/**
* The source files in this program
*/
get files() { return wrapJoinPoint(this._javaObject.getFiles()); }
get includeFolders() { return wrapJoinPoint(this._javaObject.getIncludeFolders()); }
/**
* True if the program was compiled with a C++ standard
*/
get isCxx() { return wrapJoinPoint(this._javaObject.getIsCxx()); }
/**
* A function join point with the main function of the program, if one is available
*/
get main() { return wrapJoinPoint(this._javaObject.getMain()); }
get name() { return wrapJoinPoint(this._javaObject.getName()); }
/**
* The name of the standard (e.g., c99, c++11)
*/
get standard() { return wrapJoinPoint(this._javaObject.getStandard()); }
/**
* The flag of the standard (e.g., -std=c++11)
*/
get stdFlag() { return wrapJoinPoint(this._javaObject.getStdFlag()); }
get userFlags() { return wrapJoinPoint(this._javaObject.getUserFlags()); }
get weavingFolder() { return wrapJoinPoint(this._javaObject.getWeavingFolder()); }
/**
* Adds a path to an include that the current program depends on
*/
addExtraInclude(path) { return wrapJoinPoint(this._javaObject.addExtraInclude(unwrapJoinPoint(path))); }
/**
* Adds a path based on a git repository to an include that the current program depends on
*/
addExtraIncludeFromGit(gitRepo, path) { return wrapJoinPoint(this._javaObject.addExtraIncludeFromGit(unwrapJoinPoint(gitRepo), unwrapJoinPoint(path))); }
/**
* Adds a library (e.g., -pthreads) that the current program depends on
*/
addExtraLib(lib) { return wrapJoinPoint(this._javaObject.addExtraLib(unwrapJoinPoint(lib))); }
/**
* Adds a path to a source that the current program depends on
*/
addExtraSource(path) { return wrapJoinPoint(this._javaObject.addExtraSource(unwrapJoinPoint(path))); }
/**
* Adds a path based on a git repository to a source that the current program depends on
*/
addExtraSourceFromGit(gitRepo, path) { return wrapJoinPoint(this._javaObject.addExtraSourceFromGit(unwrapJoinPoint(gitRepo), unwrapJoinPoint(path))); }
/**
* Adds a file join point to the current program
*/
addFile(file) { return wrapJoinPoint(this._javaObject.addFile(unwrapJoinPoint(file))); }
/**
* Adds a file join point to the current program, from the given path, which can be either a Java File or a String
*/
addFileFromPath(filepath) { return wrapJoinPoint(this._javaObject.addFileFromPath(unwrapJoinPoint(filepath))); }
/**
* Adds a path based on a git repository to a project that the current program depends on
*/
addProjectFromGit(gitRepo, libs, path) { return wrapJoinPoint(this._javaObject.addProjectFromGit(unwrapJoinPoint(gitRepo), unwrapJoinPoint(libs), unwrapJoinPoint(path))); }
/**
* Registers a function to be executed when the program exits
*/
atexit(func) { return wrapJoinPoint(this._javaObject.atexit(unwrapJoinPoint(func))); }
/**
* Discards the AST at the top of the ASt stack
*/
pop() { return wrapJoinPoint(this._javaObject.pop()); }
/**
* Creates a copy of the current AST and pushes it to the top of the AST stack
*/
push() { return wrapJoinPoint(this._javaObject.push()); }
/**
* Recompiles the program currently represented by the AST, transforming literal code into AST nodes. Returns true if all files could be parsed correctly, or false otherwise
*/
rebuild() { return wrapJoinPoint(this._javaObject.rebuild()); }
/**
* Similar to rebuild, but tries to fix compilation errors. Resulting program may not represent the originally intended functionality
*/
rebuildFuzzy() { return wrapJoinPoint(this._javaObject.rebuildFuzzy()); }
}
/**
* Common class of struct, union and class
*/
export class RecordJp extends NamedDecl {
/**
* @internal
*/
static _defaultAttributeInfo = {
name: "name",
};
get fields() { return wrapJoinPoint(this._javaObject.getFields()); }
get functions() { return wrapJoinPoint(this._javaObject.getFunctions()); }
/**
* True if this particular join point is an implementation (i.e. has its body fully specified), false otherwise
*/
get isImplementation() { return wrapJoinPoint(this._javaObject.getIsImplementation()); }
/**
* True if this particular join point is a prototype (i.e. does not have its body fully specified), false otherwise
*/
get isPrototype() { return wrapJoinPoint(this._javaObject.getIsPrototype()); }
get kind() { return wrapJoinPoint(this._javaObject.getKind()); }
/**
* Adds a field to a record (struct, class).
*/
addField(field) { return wrapJoinPoint(this._javaObject.addField(unwrapJoinPoint(field))); }
}
export class Statement extends Joinpoint {
/**
* @internal
*/
static _defaultAttributeInfo = {
name: null,
};
get isFirst() { return wrapJoinPoint(this._javaObject.getIsFirst()); }
get isLast() { return wrapJoinPoint(this._javaObject.getIsLast()); }
}
/**
* Represets a struct declaration
*/
export class Struct extends RecordJp {
/**
* @internal
*/
static _defaultAttributeInfo = {
name: "name",
};
}
export class Switch extends Statement {
/**
* @internal
*/
static _defaultAttributeInfo = {
name: null,
};
/**
* The case statements inside this switch
*/
get cases() { return wrapJoinPoint(this._javaObject.getCases()); }
/**
* The condition of this switch statement
*/
get condition() { return wrapJoinPoint(this._javaObject.getCondition()); }
/**
* The default case statement of this switch statement or undefined if it does not have a default case
*/
get getDefaultCase() { return wrapJoinPoint(this._javaObject.getGetDefaultCase()); }
/**
* True if there is a default case in this switch statement, false otherwise
*/
get hasDefaultCase() { return wrapJoinPoint(this._javaObject.getHasDefaultCase()); }
}
export class SwitchCase extends Statement {
/**
* @internal
*/
static _defaultAttributeInfo = {
name: null,
};
}
/**
* A pragma that references a point in the code and sticks to it
*/
export class Tag extends Pragma {
/**
* @internal
*/
static _defaultAttributeInfo = {
name: "id",
};
/**
* The ID of the pragma
*/
get id() { return wrapJoinPoint(this._javaObject.getId()); }
}
export class TernaryOp extends Op {
/**
* @internal
*/
static _defaultAttributeInfo = {
name: null,
};
get cond() { return wrapJoinPoint(this._javaObject.getCond()); }
get falseExpr() { return wrapJoinPoint(this._javaObject.getFalseExpr()); }
get trueExpr() { return wrapJoinPoint(this._javaObject.getTrueExpr()); }
}
export class This extends Expression {
/**
* @internal
*/
static _defaultAttributeInfo = {
name: null,
};
}
export class Type extends Joinpoint {
/**
* @internal
*/
static _defaultAttributeInfo = {
name: null,
};
get arrayDims() { return wrapJoinPoint(this._javaObject.getArrayDims()); }
get arraySize() { return wrapJoinPoint(this._javaObject.getArraySize()); }
get constant() { return wrapJoinPoint(this._javaObject.getConstant()); }
/**
* Single-step desugar. Returns the type itself if it does not have sugar
*/
get desugar() { return wrapJoinPoint(this._javaObject.getDesugar()); }
/**
* Single-step desugar. Returns the type itself if it does not have sugar
*/
set desugar(value) { this._javaObject.setDesugar(unwrapJoinPoint(value)); }
/**
* Completely desugars the type
*/
get desugarAll() { return wrapJoinPoint(this._javaObject.getDesugarAll()); }
/**
* A tree representation of the fields of this type
*/
get fieldTree() { return wrapJoinPoint(this._javaObject.getFieldTree()); }
get hasSugar() { return wrapJoinPoint(this._javaObject.getHasSugar()); }
get hasTemplateArgs() { return wrapJoinPoint(this._javaObject.getHasTemplateArgs()); }
get isArray() { return wrapJoinPoint(this._javaObject.getIsArray()); }
/**
* True if this is a type declared with the 'auto' keyword
*/
get isAuto() { return wrapJoinPoint(this._javaObject.getIsAuto()); }
get isBuiltin() { return wrapJoinPoint(this._javaObject.getIsBuiltin()); }
get isPointer() { return wrapJoinPoint(this._javaObject.getIsPointer()); }
get isTopLevel() { return wrapJoinPoint(this._javaObject.getIsTopLevel()); }
get kind() { return wrapJoinPoint(this._javaObject.getKind()); }
/**
* Ignores certain types (e.g., DecayedType)
*/
get normalize() { return wrapJoinPoint(this._javaObject.getNormalize()); }
get templateArgsStrings() { return wrapJoinPoint(this._javaObject.getTemplateArgsStrings()); }
get templateArgsTypes() { return wrapJoinPoint(this._javaObject.getTemplateArgsTypes()); }
set templateArgsTypes(value) { this._javaObject.setTemplateArgsTypes(unwrapJoinPoint(value)); }
/**
* Maps names of join point fields that represent type join points, to their respective values
*/
get typeFields() { return wrapJoinPoint(this._javaObject.getTypeFields()); }
/**
* If the type encapsulates another type, returns the encapsulated type
*/
get unwrap() { return wrapJoinPoint(this._javaObject.getUnwrap()); }
/**
* Returns a new node based on this type with the qualifier const
*/
asConst() { return wrapJoinPoint(this._javaObject.asConst()); }
/**
* Sets the desugared type of this type
*/
setDesugar(desugaredType) { return wrapJoinPoint(this._javaObject.setDesugar(unwrapJoinPoint(desugaredType))); }
/**
* Sets a single template argument type of a template type
*/
setTemplateArgType(index, templateArgType) { return wrapJoinPoint(this._javaObject.setTemplateArgType(unwrapJoinPoint(index), unwrapJoinPoint(templateArgType))); }
/**
* Sets the template argument types of a template type
*/
setTemplateArgsTypes(templateArgTypes) { return wrapJoinPoint(this._javaObject.setTemplateArgsTypes(unwrapJoinPoint(templateArgTypes))); }
/**
* Changes a single occurence of a type field that has the current value with new value. Returns true if there was a change
*/
setTypeFieldByValueRecursive(currentValue, newValue) { return wrapJoinPoint(this._javaObject.setTypeFieldByValueRecursive(unwrapJoinPoint(currentValue), unwrapJoinPoint(newValue))); }
/**
* Replaces an underlying type of this instance with new type, if it matches the old type. Returns true if there were changes
*/
setUnderlyingType(oldValue, newValue) { return wrapJoinPoint(this._javaObject.setUnderlyingType(unwrapJoinPoint(oldValue), unwrapJoinPoint(newValue))); }
}
/**
* Base node for declarations which introduce a typedef-name
*/
export class TypedefNameDecl extends NamedDecl {
/**
* @internal
*/
static _defaultAttributeInfo = {
name: "name",
};
}
/**
* Represents the type of a typedef.
*/
export class TypedefType extends Type {
/**
* @internal
*/
static _defaultAttributeInfo = {
name: null,
};
/**
* The typedef declaration associated with this typedef type
*/
get decl() { return wrapJoinPoint(this._javaObject.getDecl()); }
/**
* The type that is being typedef'd
*/
get underlyingType() { return wrapJoinPoint(this._javaObject.getUnderlyingType()); }
}
export class UnaryExprOrType extends Expression {
/**
* @internal
*/
static _defaultAttributeInfo = {
name: null,
};
get argExpr() { return wrapJoinPoint(this._javaObject.getArgExpr()); }
get argType() { return wrapJoinPoint(this._javaObject.getArgType()); }
set argType(value) { this._javaObject.setArgType(unwrapJoinPoint(value)); }
get hasArgExpr() { return wrapJoinPoint(this._javaObject.getHasArgExpr()); }
get hasTypeExpr() { return wrapJoinPoint(this._javaObject.getHasTypeExpr()); }
get kind() { return wrapJoinPoint(this._javaObject.getKind()); }
setArgType(argType) { return wrapJoinPoint(this._javaObject.setArgType(unwrapJoinPoint(argType))); }
}
export class UnaryOp extends Op {
/**
* @internal
*/
static _defaultAttributeInfo = {
name: null,
};
get isPointerDeref() { return wrapJoinPoint(this._javaObject.getIsPointerDeref()); }
get operand() { return wrapJoinPoint(this._javaObject.getOperand()); }
}
export class UndefinedType extends Type {
/**
* @internal
*/
static _defaultAttributeInfo = {
name: null,
};
}
/**
* A reference to a variable
*/
export class Varref extends Expression {
/**
* @internal
*/
static _defaultAttributeInfo = {
name: "name",
};
get declaration() { return wrapJoinPoint(this._javaObject.getDeclaration()); }
/**
* True if this variable reference has a MS-style property, false otherwise
*/
get hasProperty() { return wrapJoinPoint(this._javaObject.getHasProperty()); }
/**
* True if this varref represents a function call
*/
get isFunctionCall() { return wrapJoinPoint(this._javaObject.getIsFunctionCall()); }
get kind() { return wrapJoinPoint(this._javaObject.getKind()); }
get name() { return wrapJoinPoint(this._javaObject.getName()); }
set name(value) { this._javaObject.setName(unwrapJoinPoint(value)); }
/**
* If this variable reference has a MS-style property, returns the property name. Returns undefined otherwise
*/
get property() { return wrapJoinPoint(this._javaObject.getProperty()); }
/**
* Expression from where the attribute 'use' is calculated. In certain cases (e.g., array access, pointer dereference) the 'use' attribute is not calculated on the node itself, but on an ancestor of the node. This attribute returns that node
*/
get useExpr() { return wrapJoinPoint(this._javaObject.getUseExpr()); }
setName(name) { return wrapJoinPoint(this._javaObject.setName(unwrapJoinPoint(name))); }
}
export class WrapperStmt extends Statement {
/**
* @internal
*/
static _defaultAttributeInfo = {
name: null,
};
get content() { return wrapJoinPoint(this._javaObject.getContent()); }
get kind() { return wrapJoinPoint(this._javaObject.getKind()); }
}
export class AccessSpecifier extends Decl {
/**
* @internal
*/
static _defaultAttributeInfo = {
name: "kind",
};
/**
* The type of specifier. Can return 'public', 'protected', 'private' or 'none'
*/
get kind() { return wrapJoinPoint(this._javaObject.getKind()); }
}
export class AdjustedType extends Type {
/**
* @internal
*/
static _defaultAttributeInfo = {
name: null,
};
/**
* The type that is being adjusted
*/
get originalType() { return wrapJoinPoint(this._javaObject.getOriginalType()); }
}
export class ArrayAccess extends Expression {
/**
* @internal
*/
static _defaultAttributeInfo = {
name: null,
};
/**
* Expression representing the variable of the array access (can be a varref, memberAccess...)
*/
get arrayVar() { return wrapJoinPoint(this._javaObject.getArrayVar()); }
/**
* If the array access is done over a variable, returns the name of the variable. Equivalent to $arrayAccess.arrayVar.name
*/
get name() { return wrapJoinPoint(this._javaObject.getName()); }
/**
* The number of subscripts of this array access
*/
get numSubscripts() { return wrapJoinPoint(this._javaObject.getNumSubscripts()); }
/**
* A view of the current arrayAccess without the last subscript, or undefined if this arrayAccess only has one subscript
*/
get parentAccess() { return wrapJoinPoint(this._javaObject.getParentAccess()); }
/**
* Expression of the array access subscript
*/
get subscript() { return wrapJoinPoint(this._javaObject.getSubscript()); }
}
export class ArrayType extends Type {
/**
* @internal
*/
static _defaultAttributeInfo = {
name: null,
};
get elementType() { return wrapJoinPoint(this._javaObject.getElementType()); }
set elementType(value) { this._javaObject.setElementType(unwrapJoinPoint(value)); }
/**
* Sets the element type of the array
*/
setElementType(arrayElementType) { return wrapJoinPoint(this._javaObject.setElementType(unwrapJoinPoint(arrayElementType))); }
}
export class BinaryOp extends Op {
/**
* @internal
*/
static _defaultAttributeInfo = {
name: null,
};