public override bool Compare(TokenType type, ScriptObject num)
{
ScriptNumberLong val = num as ScriptNumberLong;
if (val == null) throw new ExecutionException(m_Script, this, "数字比较 两边的数字类型不一致 请先转换再比较 ");
switch (type)
{
case TokenType.Greater:
return m_Value > val.m_Value;
case TokenType.GreaterOrEqual:
return m_Value >= val.m_Value;
case TokenType.Less:
return m_Value < val.m_Value;
case TokenType.LessOrEqual:
return m_Value <= val.m_Value;
default:
throw new ExecutionException(m_Script, this, "Long类型 操作符[" + type + "]不支持");
}
}
public override ScriptObject Compute(TokenType type, ScriptObject obj)