1 19 20 package org.netbeans.lib.lexer; 21 22 import org.netbeans.lib.lexer.CharPreprocessorOperation; 23 import org.netbeans.lib.lexer.UnicodeEscapesPreprocessor; 24 25 26 32 33 public final class CharPreprocessorError { 34 35 private final String message; 36 37 private int index; 38 39 public CharPreprocessorError(String message, int index) { 40 if (message == null) { 41 throw new IllegalArgumentException ("message cannot be null"); } 43 this.message = message; 44 this.index = index; 45 } 46 47 50 public String message() { 51 return message; 52 } 53 54 57 public int index() { 58 return index; 59 } 60 61 public void updateIndex(int diff) { 62 this.index += diff; 63 } 64 65 public String description() { 66 return message + " at index=" + index; 67 } 68 69 } 70 | Popular Tags |