UNPKG

@specs-feup/kadabra

Version:

A Java source-to-source compiler written in Typescript

40 lines 1.77 kB
import { Assignment, Class, Field, LocalVariable } from "../Joinpoints.js"; import { LaraJoinPoint } from "@specs-feup/lara/api/LaraJoinPoint.js"; /** * Utility methods related to searching join points and AST properties. */ export declare class KadabraAst { private static _BINARY_OP_SET; private static _UNARY_OP_SET; /** * Searches constant values. Currently, three types of constants are returned: * - Class fields which are final and initialized when declared; * - Assignments to final fields; * - Local variables which are final and initialized when declared. * * @param startingPoint - The join point where the search for constants will start (inclusive). * @returns An array of join points, which can either be a field, an assignment, or a local variable. */ static getConstantInitializations(startingPoint?: LaraJoinPoint): (Field | Assignment | LocalVariable)[]; /** * Retrieves a set of valid binary operators. * * @returns A Set<string> with valid binary operators. */ static getBinaryOperators(): Set<string>; /** * Retrieves a set of valid unary operators. * * @returns A Set<string> with valid unary operators. */ static getUnaryOperators(): Set<string>; /** * Creates an object representing the class hierarchy of the current program. * * @returns A map where the keys are strings with the fully qualified name of the class, * and the value is an array with class join points that are subclasses of the class represented by the key. * If the map returns undefined, this means that the class has no subclasses. */ static getHierarchy(): Map<string, Class[]>; } //# sourceMappingURL=KadabraAst.d.ts.map