Logger object, for inserting code that prints/saves information to files.

Not implemented, please ignore

If set, instead of printing, will insert code for writing output to this file

Type Parameters

Hierarchy

  • loggerBase

    Constructors

    Properties

    afterJp: undefined | T = undefined
    currentElements: ElementType[] = []
    filename: undefined | string
    isGlobal: boolean
    printfFormat: Record<number, undefined | string> = ...

    Used for both C and Java printf functions

    Type: Map<string, number> = ...

    Methods

    • Parameters

      • functionId: string
      • nameGenerator: (() => string)

        Function that receives no arguments and generates a new name

          • (): string
          • Returns string

      Returns {
          alreadyDeclared: boolean;
          name: string;
      }

      • alreadyDeclared: boolean
      • name: string
    • Inserts the given code before/after the given join point.

      Override this method if you need to specialize the insertion.

      Parameters

      • $jp: any
      • insertBefore: boolean
      • code: string

      Returns void

    • Generates printf like code for c and java

      Parameters

      • printFunctionName: string

        The name of the function to use (printf for C, System.out.println for Java)

      • prefix: string = "("
      • suffix: string = ");"
      • delimiter: string = '"'

      Returns string

    • Verifies that the given $jp is inside a function.

      Requires global attribute 'ancestor'.

      Parameters

      • $jp: any
      • functionJpName: string = "function"

      Returns boolean

      true if $jp is inside a function, false otherwise