Ejemplo n.º 1
0
        public static string PapyrusValueTypeToString(PapyrusPrimitiveType valueType)
        {
            switch (valueType)
            {
            case PapyrusPrimitiveType.Boolean:
                return("Bool");

            case PapyrusPrimitiveType.Float:
                return("Float");

            case PapyrusPrimitiveType.Integer:
                return("Int");

            case PapyrusPrimitiveType.String:
                return("String");

            default:
            case PapyrusPrimitiveType.Reference:
            case PapyrusPrimitiveType.None:
                return(null);
            }
        }
Ejemplo n.º 2
0
        private OpCodeConstraint GetConstraint(PapyrusPrimitiveType argumentType)
        {
            switch (argumentType)
            {
            case PapyrusPrimitiveType.Boolean:
                return(OpCodeConstraint.Boolean);

            case PapyrusPrimitiveType.String:
                return(OpCodeConstraint.String);

            case PapyrusPrimitiveType.Integer:
                return(OpCodeConstraint.Integer);

            case PapyrusPrimitiveType.Float:
                return(OpCodeConstraint.Float);

            case PapyrusPrimitiveType.None:
                return(OpCodeConstraint.None);

            default:
                return(OpCodeConstraint.NoConstraints);
            }
        }
Ejemplo n.º 3
0
 public PapyrusVariableReference(PapyrusStringRef name, PapyrusPrimitiveType type)
 {
     Type = type;
     Name = name;
 }
Ejemplo n.º 4
0
 public PapyrusVariableReference CreateVariableReference(PapyrusPrimitiveType papyrusPrimitiveType, object value)
 {
     return(new PapyrusVariableReference {
         Type = papyrusPrimitiveType, Value = value
     });
 }
Ejemplo n.º 5
0
 public PapyrusPropertyReference(PapyrusStringRef name, object value, PapyrusPrimitiveType valueType)
 {
     Name      = name;
     Value     = value;
     ValueType = valueType;
 }