@specs-feup/metafor
Version:
A Fortran source-to-source compiler written in Typescript
79 lines • 2.16 kB
JavaScript
///////////////////////////////////////////////////
// This file is generated by build-interfaces.js //
///////////////////////////////////////////////////
import { LaraJoinPoint, registerJoinpointMapper, wrapJoinPoint, unwrapJoinPoint, } from "@specs-feup/lara/api/LaraJoinPoint.js";
export class Joinpoint extends LaraJoinPoint {
/**
* @internal
*/
static _defaultAttributeInfo = {
name: null,
};
/**
* String with the code represented by this node
*/
get code() { return wrapJoinPoint(this._javaObject.getCode()); }
/**
* Returns the parent node in the AST, or undefined if it is the root node
*/
get parent() { return wrapJoinPoint(this._javaObject.getParent()); }
/**
* Returns the 'program' join point
*/
get root() { return wrapJoinPoint(this._javaObject.getRoot()); }
/**
* Replaces this node with the given node
*/
replaceWith(node) { return wrapJoinPoint(this._javaObject.replaceWith(unwrapJoinPoint(node))); }
}
/**
* Represents a source file (e.g., .f90)
*/
export class FileJp extends Joinpoint {
/**
* @internal
*/
static _defaultAttributeInfo = {
name: "name",
};
/**
* The name of the file
*/
get name() { return wrapJoinPoint(this._javaObject.getName()); }
}
/**
* Represents the complete program and is the top-most join point in the hierarchy
*/
export class Program extends Joinpoint {
/**
* @internal
*/
static _defaultAttributeInfo = {
name: null,
};
}
/**
* Represents a Fortran statement
*/
export class Statement extends Joinpoint {
/**
* @internal
*/
static _defaultAttributeInfo = {
name: null,
};
get isFirst() { return wrapJoinPoint(this._javaObject.getIsFirst()); }
get isLast() { return wrapJoinPoint(this._javaObject.getIsLast()); }
}
const JoinpointMapper = {
joinpoint: Joinpoint,
file: FileJp,
program: Program,
statement: Statement,
};
let registered = false;
if (!registered) {
registerJoinpointMapper(JoinpointMapper);
registered = true;
}
//# sourceMappingURL=Joinpoints.js.map