Пример #1
0
 /// <summary>
 /// Prints a parsing error message with a given format, arguments and the name of the file and the location of the error.
 /// </summary>
 /// <param name="activeFile">The name of the file where the error is detected.</param>
 /// <param name="location">The location within the active file of the error.</param>
 /// <param name="format">The format of the message.</param>
 /// <param name="args">An object array that contains zero or more objects to format. </param>
 /// <exception cref="ArgumentNullException"><paramref name="format"/> or <paramref name="format"/> is <see langword="null"/>.</exception>
 /// <exception cref="FormatException"><paramref name="format"/> is invalid.</exception>
 /// <exception cref="FormatException">The index of a format item is less than zero, or greater than or equal to the length of the <paramref name="args"/> array.</exception>
 /// <remarks>
 /// <para>If the active file or the location are not effective, no parsing error message will be printed.</para>
 /// <para>If the interaction level doesn't support errors, no message is printed.</para>
 /// </remarks>
 public static void ParsingError(string activeFile, LexSpan location, string format, params object[] args)
 {
     ActiveFile = activeFile;
     ParsingError (location, format, args);
 }
Пример #2
0
 /// <summary>
 /// This method implements the IMerge interface
 /// </summary>
 /// <param name="end">The last span to be merged</param>
 /// <returns>A span from the start of 'this' to the end of 'end'</returns>
 public LexSpan Merge(LexSpan end)
 {
     return new LexSpan (startLine, startColumn, end.endLine, end.endColumn, startIndex, end.endIndex, buffer);
 }
Пример #3
0
 /// <summary>
 /// Prints a parsing error message with a given format, arguments and the location of the error. <see cref="Interaction.ActiveFile"/> will provide the active file.
 /// </summary>
 /// <param name="location">The location within the active file of the error.</param>
 /// <param name="format">The format of the message.</param>
 /// <param name="args">An object array that contains zero or more objects to format. </param>
 /// <exception cref="ArgumentNullException"><paramref name="format"/> or <paramref name="format"/> is <see langword="null"/>.</exception>
 /// <exception cref="FormatException"><paramref name="format"/> is invalid.</exception>
 /// <exception cref="FormatException">The index of a format item is less than zero, or greater than or equal to the length of the <paramref name="args"/> array.</exception>
 /// <remarks>
 /// <para>If the active file or the location are not effective, no parsing error message will be printed.</para>
 /// <para>If the interaction level doesn't support errors, no message is printed.</para>
 /// </remarks>
 public static void ParsingError(LexSpan location, string format, params object[] args)
 {
     Location = location;
     ParsingError (format, args);
 }
Пример #4
0
 /// <summary>
 /// This method implements the IMerge interface
 /// </summary>
 /// <param name="end">The last span to be merged</param>
 /// <returns>A span from the start of 'this' to the end of 'end'</returns>
 public LexSpan Merge(LexSpan end)
 {
     return(new LexSpan(startLine, startColumn, end.endLine, end.endColumn, startIndex, end.endIndex, buffer));
 }