コード例 #1
0
        public CircularTypeReferencesError(IEnumerable<TypeDeclarationNode> types, SourceLocation location)
            : base(location)
        {
            _types = types;

            OrderedTypes = CheckForCircularTypeReferences(_types).ToList();
        }
コード例 #2
0
 public MethodNotFoundError(Type targetType, string methodName, Type[] argTypes, SourceLocation location)
     : base(location)
 {
     _targetType = targetType;
     _methodName = methodName;
     _argTypes = argTypes;
 }
コード例 #3
0
 public OperatorNotDefinedError(Type left, Type right, TigerOperator @operator, SourceLocation location)
     : base(location)
 {
     Left = left;
     Right = right;
     Operator = @operator;
 }
コード例 #4
0
 public FunctionNotDefinedError(string functionName, IEnumerable<Type> argTypes, FunctionScope scope,
                                SourceLocation location)
     : base(location)
 {
     _functionName = functionName;
     _argTypes = argTypes;
     _scope = scope;
 }
コード例 #5
0
        public NotEnumerableError(Type targetType, SourceLocation location)
            : base(location)
        {
            TargetType = targetType;

            try
            {
                CollectionType = TypeUtils.GetCollectionType(targetType);
            }
            catch (ArgumentException e)
            {
                _isActive = true;
            }
        }
コード例 #6
0
 public FieldNotFoundError(Type targetType, string fieldName, SourceLocation location)
     : base(targetType, fieldName, location)
 {
     FieldInfo fieldInfo = targetType.GetField(fieldName);
     if (fieldInfo != null)
     {
         PropertyType = fieldInfo.FieldType;
         _isActive = false;
     }
     else
     {
         PropertyInfo propertyInfo = targetType.GetProperty(fieldName);
         if (propertyInfo != null)
         {
             PropertyType = propertyInfo.PropertyType;
             _isActive = false;
         }
         else
         {
             _isActive = true;
         }
     }
 }
コード例 #7
0
 public CanNotInferArrayTypeError(IEnumerable<Type> itemTypes, SourceLocation location)
     : base(location)
 {
     ItemTypes = itemTypes;
 }
 public MemberWithSameSignatureAlreadyDefinedError(string memberName, IEnumerable<Type> argTypes,
                                                   AstHelper helper, SourceLocation location)
     : base(memberName, helper, location)
 {
     ArgTypes = argTypes;
 }
 public TypeWithSameNameAlreadyDefinedError(string typeName, TypeScope scope, SourceLocation location)
     : base(location)
 {
     _typeName = typeName;
     _scope = scope;
 }
コード例 #10
0
 public ExpectingTypeError(SourceLocation location, Expecting expecting)
     : base(location)
 {
     _expecting = expecting;
 }
コード例 #11
0
 public SomeParametersWithTheSameNameError(IEnumerable<FunctionParameterExpression> parameters,
                                           SourceLocation location)
     : base(location)
 {
     Parameters = parameters;
 }
コード例 #12
0
 public CanNotInferTypeError(Type left, Type right, SourceLocation location)
     : base(location)
 {
     _left = left;
     _right = right;
 }
コード例 #13
0
 public NotAssignableError(Type variableType, Type valueType, SourceLocation location)
     : base(location)
 {
     _variableType = variableType;
     _valueType = valueType;
 }
コード例 #14
0
 protected MemberNotFoundError(Type targetType, string memberName, SourceLocation location)
     : base(location)
 {
     TargetType = targetType;
     MemberName = memberName;
 }
コード例 #15
0
 public BreakOutOfLoopScopeError(SourceLocation location, LoopScope scope)
     : base(location)
 {
     _scope = scope;
 }
コード例 #16
0
 public MissingTypeError(string typeName, TypeScope scope, SourceLocation location)
     : base(location)
 {
     _typeName = typeName;
     _scope = scope;
 }
コード例 #17
0
 public VariableAlreadyDefinedError(string variableName, AstHelper helper, SourceLocation location)
     : base(variableName, helper, location)
 {
 }
コード例 #18
0
 public NotAnArrayTypeError(Type type, SourceLocation location)
     : base(location)
 {
     _type = type;
 }
コード例 #19
0
 public TypeMismatchedError(Type expectedType, Type actualType, SourceLocation location)
     : base(location)
 {
     _expectedType = expectedType;
     _actualType = actualType;
 }
コード例 #20
0
 public NotBoolConvertibleError(Type type, SourceLocation location)
     : base(type, typeof (void), location)
 {
 }
コード例 #21
0
 public ContinueOutOfLoopScopeError(SourceLocation location, LoopScope scope)
     : base(location)
 {
     _scope = scope;
 }
コード例 #22
0
 public TypeMatchedError(Type type, Type expected, SourceLocation location)
     : base(location)
 {
     _type = type;
     _expected = expected;
 }
コード例 #23
0
 public IdentifierNotDefinedError(string variableName, VariableScope scope, SourceLocation location)
     : base(location)
 {
     _variableName = variableName;
     _scope = scope;
 }
コード例 #24
0
 protected ErrorBase(SourceLocation location)
 {
     Location = location;
 }
コード例 #25
0
 public IdentifierExpectedError(string identifier, SourceLocation location)
     : base(location)
 {
     Identifier = identifier;
 }
コード例 #26
0
 public IfThenBodyReturnsValueError(Type returnedType, SourceLocation location)
     : base(typeof (void), returnedType, location)
 {
 }
 public MemberWithSameNameAlreadyDefinedError(string memberName, AstHelper helper, SourceLocation location)
     : base(location)
 {
     MemberName = memberName;
     Helper = helper;
 }
コード例 #28
0
 public ConditionalNotEquivalentTypes(Type thenType, Type elseType, SourceLocation location)
     : base(thenType, elseType, location)
 {
 }