compiler/ast/reports_internal

  Source   Edit

module with internal legacy reports definitions

TODO: even though it's legacy internal reports should not be in the ast
package.
TODO: This module needs to be broken and those parts placed correctly:
  1. Internal assertion/error related bits
  2. Internal state/user input types
  3. Help/CLI messages, etc
  4. General report cruft

Types

InternalReport = object of ReportBase
  msg*: string
  case kind*: ReportKind
  of rintStackTrace:
      trace*: seq[StackTraceEntry] ## Generated stack trace entries
    
  of rintAssert:
      expression*: string

  of rintSuccessX:
      buildParams*: UsedBuildParams

  of rintCannotOpenFile .. rintWarnFileChanged:
      file*: string

  of rintListWarnings, rintListHints:
      enabledOptions*: set[ReportKind]

  else:
      nil

  
Report generated for the internal compiler workings   Source   Edit
UsedBuildParams = object
  project*: string
  output*: string
  linesCompiled*: int
  mem*: int
  isMaxMem*: bool
  sec*: float
  case isCompilation*: bool
  of true:
      threads*: bool
      backend*: string
      buildMode*: string
      optimize*: string
      gc*: string

  of false:
      nil

  
  Source   Edit

Procs

func severity(report: InternalReport): ReportSeverity {....raises: [], tags: [].}
  Source   Edit