示例#1
0
        public CompilationError(SourceRange sourceRange, ErrorId id, string text)
        {
            if (text == null)
            {
                throw ExceptionBuilder.ArgumentNull("text");
            }

            _sourceRange = sourceRange;
            _id          = id;
            _text        = text;
        }
示例#2
0
        void IErrorReporter.InvocationRequiresParentheses(SourceRange sourceRange, InvocableBinding[] invocableGroup)
        {
            string message = String.Format(CultureInfo.CurrentCulture, Resources.InvocationRequiresParentheses, invocableGroup[0].GetFullName());

            HandleError(sourceRange, ErrorId.InvocationRequiresParentheses, message);
        }
示例#3
0
        void IErrorReporter.AmbiguousProperty(SourceRange sourceRange, Identifier identifier, PropertyBinding[] candidates)
        {
            string message = String.Format(CultureInfo.CurrentCulture, Resources.AmbiguousProperty, identifier, FormattingHelpers.FormatBindingList(candidates));

            HandleError(sourceRange, ErrorId.AmbiguousProperty, message);
        }
示例#4
0
        void IErrorReporter.AmbiguousReference(SourceRange sourceRange, Identifier identifier, Binding[] candidates)
        {
            string message = String.Format(CultureInfo.CurrentCulture, Resources.AmbiguousReference, identifier, FormattingHelpers.FormatBindingListWithCategory(candidates));

            HandleError(sourceRange, ErrorId.AmbiguousReference, message);
        }
示例#5
0
        void IErrorReporter.UndeclaredEntity(SourceRange sourceRange, Identifier identifier)
        {
            string message = String.Format(CultureInfo.CurrentCulture, Resources.UndeclaredEntity, identifier);

            HandleError(sourceRange, ErrorId.UndeclaredEntity, message);
        }
示例#6
0
        void IErrorReporter.UndeclaredType(SourceRange sourceRange, string typeName)
        {
            string message = String.Format(CultureInfo.CurrentCulture, Resources.UndeclaredType, typeName);

            HandleError(sourceRange, ErrorId.UndeclaredType, message);
        }
示例#7
0
        void IErrorReporter.InvalidReal(SourceRange sourceRange, string tokenText)
        {
            string message = String.Format(CultureInfo.CurrentCulture, Resources.InvalidDecimal, tokenText);

            HandleError(sourceRange, ErrorId.InvalidReal, message);
        }
示例#8
0
        void IErrorReporter.InvalidRowReference(SourceRange sourceRange, TableRefBinding derivedTableRef)
        {
            string message = String.Format(CultureInfo.CurrentCulture, Resources.InvalidRowReference, derivedTableRef.Name);

            HandleError(sourceRange, ErrorId.InvalidRowReference, message);
        }
示例#9
0
        void IErrorReporter.UndeclaredMethod(SourceRange sourceRange, Type declaringType, Identifier identifier, Type[] parameterTypes)
        {
            string message = String.Format(CultureInfo.CurrentCulture, Resources.UndeclaredMethod, declaringType.Name, identifier, FormattingHelpers.FormatTypeList(parameterTypes));

            HandleError(sourceRange, ErrorId.UndeclaredMethod, message);
        }
示例#10
0
        void IErrorReporter.InvalidOperatorForAllAny(SourceRange sourceRange, BinaryOperator foundOp)
        {
            string message = String.Format(CultureInfo.CurrentCulture, Resources.InvalidOperatorForAllAny, foundOp.TokenText);

            HandleError(sourceRange, ErrorId.InvalidOperatorForAllAny, message);
        }
示例#11
0
        void IErrorReporter.TableReferenceExpected(SourceRange sourceRange, string foundTokenText)
        {
            string message = String.Format(CultureInfo.CurrentCulture, Resources.TableReferenceExpected, foundTokenText);

            HandleError(sourceRange, ErrorId.TableReferenceExpected, message);
        }
示例#12
0
        void IErrorReporter.SimpleExpressionExpected(SourceRange sourceRange, string tokenText)
        {
            string message = String.Format(CultureInfo.CurrentCulture, Resources.SimpleExpressionExpected, tokenText);

            HandleError(sourceRange, ErrorId.SimpleExpressionExpected, message);
        }
示例#13
0
        void IErrorReporter.TokenExpected(SourceRange sourceRange, string foundTokenText, TokenId expected)
        {
            string message = String.Format(CultureInfo.CurrentCulture, Resources.TokenExpected, foundTokenText, TokenInfo.FromTokenId(expected).Text);

            HandleError(sourceRange, ErrorId.TokenExpected, message);
        }
示例#14
0
        void IErrorReporter.NumberTooLarge(SourceRange sourceRange, string tokenText)
        {
            string message = String.Format(CultureInfo.CurrentCulture, Resources.NumberTooLarge, tokenText);

            HandleError(sourceRange, ErrorId.NumberTooLarge, message);
        }
示例#15
0
        void IErrorReporter.InvalidTypeReference(SourceRange sourceRange, string tokenText)
        {
            string message = String.Format(CultureInfo.CurrentCulture, Resources.InvalidTypeReference, tokenText);

            HandleError(sourceRange, ErrorId.InvalidTypeReference, message);
        }
示例#16
0
        void IErrorReporter.AsteriskModifierNotAllowed(SourceRange sourceRange, ExpressionNode functionInvocation)
        {
            string message = String.Format(CultureInfo.CurrentCulture, Resources.AsteriskModifierNotAllowed, functionInvocation.GenerateSource());

            HandleError(sourceRange, ErrorId.AsteriskModifierNotAllowed, message);
        }
示例#17
0
 private void HandleError(SourceRange sourceRange, ErrorId errorId, string message)
 {
     OnError(new CompilationError(sourceRange, errorId, message));
 }
示例#18
0
        void IErrorReporter.UndeclaredColumn(SourceRange sourceRange, TableRefBinding tableRefBinding, Identifier identifier)
        {
            string message = String.Format(CultureInfo.CurrentCulture, Resources.UndeclaredColumn, tableRefBinding.Name, identifier);

            HandleError(sourceRange, ErrorId.UndeclaredColumn, message);
        }
示例#19
0
        void IErrorReporter.NoColumnAliasSpecified(SourceRange sourceRange, int columnIndex, Identifier derivedTableName)
        {
            string message = String.Format(CultureInfo.CurrentCulture, Resources.NoColumnAliasSpecified, columnIndex + 1, derivedTableName.ToSource());

            HandleError(sourceRange, ErrorId.NoColumnAliasSpecified, message);
        }
示例#20
0
        void IErrorReporter.UndeclaredProperty(SourceRange sourceRange, Type type, Identifier identifier)
        {
            string message = String.Format(CultureInfo.CurrentCulture, Resources.UndeclaredProperty, FormattingHelpers.FormatType(type), identifier);

            HandleError(sourceRange, ErrorId.UndeclaredProperty, message);
        }