Directly from the source code of the compiler:
namespace Nemerle.English
{
[assembly: Nemerle.Internal.OperatorAttribute ("Nemerle.English", "and", false, 160, 161)]
[assembly: Nemerle.Internal.OperatorAttribute ("Nemerle.English", "or", false, 150, 151)]
[assembly: Nemerle.Internal.OperatorAttribute ("Nemerle.English", "not", true, 181, 180)]
macro @and (e1, e2) {
<[ $e1 && $e2 ]>
}
macro @or (e1, e2) {
<[ $e1 || $e2 ]>
}
macro @not (e) {
<[ ! $e ]>
}
You need to sprinkle with OperatorAttributes and it will work. Btw, OperatorAttribute is defined as follows:
public class OperatorAttribute : NemerleAttribute
{
public mutable env : string;
public mutable name : string;
public mutable IsUnary : bool;
public mutable left : int;
public mutable right : int;
}
Adept source
share