internal void CreateEnumerateConstantsSymbol(DiagnosticBag diagnostic)
{
var method = this.ScriptType.EnumerateConstantsSymbol;
// var consts = this.Compilation. ...
// void (Action<string, RuntimeMethodHandle> callback)
var body = MethodGenerator.GenerateMethodBody(this, method,
(il) =>
{
var action_string_method = method.Parameters[0].Type;
Debug.Assert(action_string_method.Name == "Action");
var invoke = action_string_method.DelegateInvokeMethod();
Debug.Assert(invoke != null);
// TODO:
//foreach (var c in consts)
//{
// // callback.Invoke(c.Name, c.Value, c.IgnoreCase)
// il.EmitLoadArgumentOpcode(0);
// il.EmitStringConstant(c.Name);
// // c.Value
// // c.IgnoreCase
// il.EmitCall(this, diagnostic, ILOpCode.Callvirt, invoke);
//}
//
il.EmitRet(true);
},
null, diagnostic, false);
SetMethodBody(method, body);
}
}