function parseStatement(codeString, assertion) {
  const parsed = parse(codeString);
  if (!parsed || parsed.type !== 'File') {
    throw createError('Internal error: Expected File from parsed result.');
  }
  const statement = parsed.program.body[0];
  if (!statement || !assertion(statement)) {
    throw createError(`Internal error: Parsed result did not match assertion ${assertion.name}.`);
  }
  return statement;
}
@template {Statement} T
@param {string} codeString
@param {(statement: Statement) => statement is T} assertion
@returns {T}