All files / transpiler/constants LANGUAGE_STANDARD_ORDER.ts

100% Statements 1/1
100% Branches 0/0
100% Functions 0/0
100% Lines 1/1

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                32x                  
import type TLanguageStandard from "../types/TLanguageStandard";
 
/**
 * Issue #1143: Ordering within a language family, so "above the baseline" is a
 * comparison rather than a hand-maintained list that drifts.
 *
 * Only compare values whose LANGUAGE_STANDARD_FAMILY matches.
 */
const LANGUAGE_STANDARD_ORDER: Record<TLanguageStandard, number> = {
  C99: 1,
  C11: 2,
  "C++11": 1,
  "C++14": 2,
  "C++20": 3,
};
 
export default LANGUAGE_STANDARD_ORDER;