getContext method

HTContext getContext({
  1. bool filename = true,
  2. bool moduleName = true,
  3. bool namespace = true,
  4. bool ip = true,
  5. bool line = true,
  6. bool column = true,
})

Get the current context of the interpreter, parameter determines wether to store certain items. For example, if you set ip to false, the context you get from this method will leave ip as null.

Implementation

HTContext getContext({
  bool filename = true,
  bool moduleName = true,
  bool namespace = true,
  bool ip = true,
  bool line = true,
  bool column = true,
}) {
  return HTContext(
    filename: filename ? currentFileName : null,
    moduleName: moduleName ? currentBytecodeModule.id : null,
    namespace: namespace ? currentNamespace : null,
    ip: ip ? currentBytecodeModule.ip : null,
    line: line ? currentLine : null,
    column: column ? currentColumn : null,
  );
}