public CompilationError(SourceRange sourceRange, ErrorId id, string text) { if (text == null) { throw ExceptionBuilder.ArgumentNull("text"); } _sourceRange = sourceRange; _id = id; _text = text; }
void IErrorReporter.InvocationRequiresParentheses(SourceRange sourceRange, InvocableBinding[] invocableGroup) { string message = String.Format(CultureInfo.CurrentCulture, Resources.InvocationRequiresParentheses, invocableGroup[0].GetFullName()); HandleError(sourceRange, ErrorId.InvocationRequiresParentheses, message); }
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); }
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); }
void IErrorReporter.UndeclaredEntity(SourceRange sourceRange, Identifier identifier) { string message = String.Format(CultureInfo.CurrentCulture, Resources.UndeclaredEntity, identifier); HandleError(sourceRange, ErrorId.UndeclaredEntity, message); }
void IErrorReporter.UndeclaredType(SourceRange sourceRange, string typeName) { string message = String.Format(CultureInfo.CurrentCulture, Resources.UndeclaredType, typeName); HandleError(sourceRange, ErrorId.UndeclaredType, message); }
void IErrorReporter.InvalidReal(SourceRange sourceRange, string tokenText) { string message = String.Format(CultureInfo.CurrentCulture, Resources.InvalidDecimal, tokenText); HandleError(sourceRange, ErrorId.InvalidReal, message); }
void IErrorReporter.InvalidRowReference(SourceRange sourceRange, TableRefBinding derivedTableRef) { string message = String.Format(CultureInfo.CurrentCulture, Resources.InvalidRowReference, derivedTableRef.Name); HandleError(sourceRange, ErrorId.InvalidRowReference, message); }
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); }
void IErrorReporter.InvalidOperatorForAllAny(SourceRange sourceRange, BinaryOperator foundOp) { string message = String.Format(CultureInfo.CurrentCulture, Resources.InvalidOperatorForAllAny, foundOp.TokenText); HandleError(sourceRange, ErrorId.InvalidOperatorForAllAny, message); }
void IErrorReporter.TableReferenceExpected(SourceRange sourceRange, string foundTokenText) { string message = String.Format(CultureInfo.CurrentCulture, Resources.TableReferenceExpected, foundTokenText); HandleError(sourceRange, ErrorId.TableReferenceExpected, message); }
void IErrorReporter.SimpleExpressionExpected(SourceRange sourceRange, string tokenText) { string message = String.Format(CultureInfo.CurrentCulture, Resources.SimpleExpressionExpected, tokenText); HandleError(sourceRange, ErrorId.SimpleExpressionExpected, message); }
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); }
void IErrorReporter.NumberTooLarge(SourceRange sourceRange, string tokenText) { string message = String.Format(CultureInfo.CurrentCulture, Resources.NumberTooLarge, tokenText); HandleError(sourceRange, ErrorId.NumberTooLarge, message); }
void IErrorReporter.InvalidTypeReference(SourceRange sourceRange, string tokenText) { string message = String.Format(CultureInfo.CurrentCulture, Resources.InvalidTypeReference, tokenText); HandleError(sourceRange, ErrorId.InvalidTypeReference, message); }
void IErrorReporter.AsteriskModifierNotAllowed(SourceRange sourceRange, ExpressionNode functionInvocation) { string message = String.Format(CultureInfo.CurrentCulture, Resources.AsteriskModifierNotAllowed, functionInvocation.GenerateSource()); HandleError(sourceRange, ErrorId.AsteriskModifierNotAllowed, message); }
private void HandleError(SourceRange sourceRange, ErrorId errorId, string message) { OnError(new CompilationError(sourceRange, errorId, message)); }
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); }
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); }
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); }