rem: return scheme_make_syntax_compiled(REF_EXPD, var);
add: if (rec[drec].comp) return scheme_make_syntax_compiled(REF_EXPD, var); else return scheme_void;
context: ref_syntax (Scheme_Object *form, Scheme_Comp_Env *env, Scheme_Compile_Info *rec, int drec){  Scheme_Env *menv = NULL;  Scheme_Object *var, *name, *rest;  int l, ok;  l = check_form(form, form);  if (l != 2)    bad_form(form, l);  rest = SCHEME_STX_CDR(form);  name = SCHEME_STX_CAR(rest);  if (SCHEME_STX_PAIRP(name)) {    rest = SCHEME_STX_CAR(name);    if (env->genv->phase == 0) {      var = scheme_top_stx;    } else {      var = scheme_datum_to_syntax(SCHEME_STX_VAL(scheme_top_stx), scheme_false, scheme_sys_wraps(env), 0, 0);    }    ok = scheme_stx_module_eq(rest, var, env->genv->phase);  } else     ok = SCHEME_STX_SYMBOLP(name);  if (!ok) {    scheme_wrong_syntax("#%variable-reference", name, 			form, 			"not an identifier or #%%top form");    return NULL;  }  if (SCHEME_STX_PAIRP(name)) {    var = scheme_expand_expr(name, env, rec, drec);  } else {    scheme_rec_add_certs(rec, drec, form);    var = scheme_lookup_binding(name, env, 				SCHEME_REFERENCING 				+ SCHEME_GLOB_ALWAYS_REFERENCE				+ (rec[drec].dont_mark_local_use 				   ? SCHEME_DONT_MARK_USE 				   : 0)				+ (rec[drec].resolve_module_ids				   ? SCHEME_RESOLVE_MODIDS				   : 0),				rec[drec].certs, env->in_modidx, 				&menv, NULL);    if (SAME_TYPE(SCHEME_TYPE(var), scheme_variable_type)	|| SAME_TYPE(SCHEME_TYPE(var), scheme_module_variable_type)) {      var = scheme_register_toplevel_in_prefix(var, env, rec, drec);    } else {      scheme_wrong_syntax(NULL, name, form, "identifier does not refer to a top-level or module variable");    }    scheme_compile_rec_done_local(rec, drec);  }  return scheme_make_syntax_compiled(REF_EXPD, var);}