2
我的問題是在下面的代碼評論。Nemerle OperatorAttribute parameters
namespace TestMacroLib
{
[assembly: Nemerle.Internal.OperatorAttribute ("TestMacroLib", "multiply", false, 160, 161)]
// what does 160 and 161 represent? The parameters are "left" and "right", but that doesn't help.
public macro multiply(op1, op2)
{
<[ ($op1 * $op2) ]>
}
}
此代碼樣品來自: Infix format for Nemerle macro
我認爲具有更高數字的運營商具有更高的優先級。從[Nemerle的源代碼](http://nemerle.googlecode.com/svn/nemerle/trunk/macros/core.n)查看這兩個運算符: '[assembly:Nemerle.Internal.OperatorAttribute(「 Nemerle.Core「,」&&「,false,160,161)] [彙編:Nemerle.Internal.OperatorAttribute(」Nemerle.Core「,」||「,false,150,151)]' – daniel1426
謝謝,我的壞。固定。 –