/// <summary> /// Initializes a new instance of the <see cref="LexerException"/> class with the specified <see cref="LinePragma"/> and error message. /// </summary> /// <param name="linePragma">The position where the exception is thrown.</param> /// <param name="message">The error message that explains the reason for the exception.</param> /// <exception cref="ArgumentNullException"><paramref name="linePragma"/> is <see langword="null"/>.</exception> public LexerException(LinePragma linePragma, string message) : base(message) { if (linePragma == null) { throw new ArgumentNullException(); } LinePragma = linePragma; }
/// <summary> /// Initializes a new instance of the <see cref="LexerException"/> class with the specified <see cref="LinePragma"/>. /// </summary> /// <param name="linePragma">The position where the exception is thrown.</param> /// <exception cref="ArgumentNullException"><paramref name="linePragma"/> is <see langword="null"/>.</exception> public LexerException(LinePragma linePragma) : base(ExceptionResource.SyntaxError) { if (linePragma == null) { throw new ArgumentNullException(); } LinePragma = linePragma; }
internal Token(LinePragma linePragma, Lexeme lexeme, string text) { LinePragma = linePragma; Lexeme = lexeme; Text = text; }