static ScriptOperandType GetCode(string code, int index)
{
if (index >= code.Length)
return ScriptOperandType.None;
switch (code[index]) {
case '-': return ScriptOperandType.None;
case '?': return ScriptOperandType.Unknown;
case 'i': return ScriptOperandType.Integer;
case 'u': return ScriptOperandType.UnsignedInteger;
case 'b': return ScriptOperandType.Boolean;
case 'r': return ScriptOperandType.RelativeOffset;
default: throw new NotImplementedException();
}
}