/** * Creates a small AST to represent the declaration of a unary operator. This * declaration summarizes the operator's type information. * * @param op * the spelling of the operator * @param argType * the type of the argument of the unary operator * @param resultType * the type of the result * @return a UnaryOperatorDeclaration of the given operator with the given * argument type and returning the given result type */ static UnaryOperatorDeclaration DeclareStdUnaryOp(string op, TypeDenoter argType, TypeDenoter resultType) { var opAst = new Operator(op); var binding = new UnaryOperatorDeclaration(opAst, argType, resultType); return(binding); }
public int VisitUnaryOperatorDeclaration(UnaryOperatorDeclaration ast, Frame frame) { return(0); }
public Void VisitUnaryOperatorDeclaration(UnaryOperatorDeclaration ast, Void arg) { return(null); }
void EnterStdDeclaration(UnaryOperatorDeclaration declaration) { EnterStdDeclaration(declaration.Operator, declaration); }