Ejemplo n.º 1
0
 public static DmlSyntaxError BadBinaryOperandTypes(string @operator, DmlType first, DmlType second)
 {
     return(new DmlSyntaxError(
                String.Format(
                    "Invalid syntax; invalid operand types {0} and {1} for operator {2}.", @operator, first, second)
                ));
 }
Ejemplo n.º 2
0
 /// <summary>
 /// The default error thrown when the argument type for a function is invalid.
 /// </summary>
 /// <param name="funcName"></param>
 /// <param name="argNum"></param>
 /// <param name="expected"></param>
 /// <param name="received"></param>
 /// <returns></returns>
 public static DmlSyntaxError BadArgumentType(string funcName, int argNum, DmlType expected, DmlType received)
 {
     return(new DmlSyntaxError(
                String.Format(
                    "Invalid syntax; function {0} expects type {1} as argument {2}; got type {3} instead.",
                    funcName, expected, argNum, received)
                ));
 }
Ejemplo n.º 3
0
 /// <summary>
 /// The default error thrown when the argument type for a function is invalid.
 /// </summary>
 /// <param name="funcName"></param>
 /// <param name="argNum"></param>
 /// <param name="expected"></param>
 /// <param name="received"></param>
 /// <returns></returns>
 public static DmlSyntaxError BadArgumentType(string funcName, int argNum, DmlType expected, DmlType received)
 {
     return new DmlSyntaxError(
         String.Format(
             "Invalid syntax; function {0} expects type {1} as argument {2}; got type {3} instead.",
             funcName, expected, argNum, received)
         );
 }
Ejemplo n.º 4
0
 public static DmlSyntaxError BadUnaryOperandType(string @operator, DmlType operand)
 {
     return(new DmlSyntaxError(
                String.Format("Invalid syntax; invalid operand type {0} for unary operator {1}.", @operator, operand)
                ));
 }
Ejemplo n.º 5
0
 public DmlObject(DmlType type, object value)
 {
     Type      = type;
     Value     = value;
     BoundVars = new Dictionary <string, DmlObject>();
 }
Ejemplo n.º 6
0
 private DmlOptionFactory(string name, string[] parameters, DmlType[] types)
 {
     this.name = name;
     Parameters = parameters;
     this.types = types;
 }
Ejemplo n.º 7
0
 public DmlObject(DmlType type, object value)
 {
     Type = type;
     Value = value;
     BoundVars = new Dictionary<string, DmlObject>();
 }
Ejemplo n.º 8
0
 public static DmlObject Instantiate(string name, string[] parameters, DmlType[] types)
 {
     return new DmlObject(DmlType.Function, new DmlOptionFactory(name, parameters, types));
 }
Ejemplo n.º 9
0
 public static DmlSyntaxError BadBinaryOperandTypes(string @operator, DmlType first, DmlType second)
 {
     return new DmlSyntaxError(
         String.Format(
             "Invalid syntax; invalid operand types {0} and {1} for operator {2}.", @operator, first, second)
             );
 }
Ejemplo n.º 10
0
 public static DmlSyntaxError BadUnaryOperandType(string @operator, DmlType operand)
 {
     return new DmlSyntaxError(
         String.Format("Invalid syntax; invalid operand type {0} for unary operator {1}.", @operator, operand)
         );
 }