All files / transpiler/types IRecordedAdrSite.ts

0% Statements 0/0
0% Branches 0/0
0% Functions 0/0
0% Lines 0/0

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28                                                       
/**
 * Issue #1241: a source position at which an ADR's rule actually fired.
 *
 * The counterpart to IRequirementSite (#1143), and recorded the same way: by the
 * code that took the decision, at the moment it took it, so a consumer can never
 * disagree with what happened.
 *
 * This exists because matrix occupancy is DERIVED, never declared. The context
 * axis is resolved by walking the parse tree at a position, and until now the
 * only positions available were diagnostic positions from an `.expected.error`.
 * That made every codegen-only fixture invisible: ADR-057 is about resolution
 * SUCCEEDING, so its fixtures assert generated C and emit no diagnostic, and
 * eleven of them could not occupy a single cell. Recording where the rule fired
 * gives those fixtures a position without asking them to declare one.
 */
interface IRecordedAdrSite {
  /** ADR number as it appears in `// test-adr:`, e.g. "057". */
  readonly adr: string;
 
  /** Path of the .cnx file whose source carried the construct. */
  readonly sourcePath: string;
 
  /** 1-based line in that file. */
  readonly line: number;
}
 
export default IRecordedAdrSite;