SPeCS Packages Documentation
    Preparing search index...

    Utility methods related with the source code.

    Index

    Constructors

    Methods

    • Returns the function definitions in the program with the given name.

      Parameters

      • functionName: string

        The name of the function to find

      • isSingleFunction: boolean

        If true, ensures there is a single definition with the given name

      Returns FunctionJp | FunctionJp[]

      An array of function definitions, or a single function is 'isSingleFunction' is true

    • Tries to statically detect if a statement is executed only once.

      Restrictions:

      • Does not take into account runtime execution problems, such as exceptions;
      • Does not detect if the function is called indirectly through a function pointer;

      Parameters

      Returns boolean

      True if it could be detected, within the restrictions, that the statement is only executed once.

    • Writes the code corresponding to the current AST as a single file.

      Parameters

      • OptionalfileOrBaseFolder: string | File
      • OptionaloptionalFile: string | File

      Returns void