23 * questions.
24 */
25
26 package jdk.nashorn.api.tree;
27
28 /**
29 * Interface for diagnostics from tools. A diagnostic usually reports
30 * a problem at a specific position in a source file. However, not
31 * all diagnostics are associated with a position or a file.
32 *
33 * <p>A position is a zero-based character offset from the beginning of
34 * a file. Negative values (except {@link #NOPOS}) are not valid
35 * positions.
36 *
37 * <p>Line and column numbers begin at 1. Negative values (except
38 * {@link #NOPOS}) and 0 are not valid line or column numbers.
39 *
40 * <p>Line terminator is as defined in ECMAScript specification which is one
41 * of { \u000A, \u000B, \u2028, \u2029 }.
42 *
43 * @since 1.9
44 */
45 @jdk.Exported
46 public interface Diagnostic {
47
48 /**
49 * Kinds of diagnostics, for example, error or warning.
50 *
51 * The kind of a diagnostic can be used to determine how the
52 * diagnostic should be presented to the user. For example,
53 * errors might be colored red or prefixed with the word "Error",
54 * while warnings might be colored yellow or prefixed with the
55 * word "Warning". There is no requirement that the Kind
56 * should imply any inherent semantic meaning to the message
57 * of the diagnostic: for example, a tool might provide an
58 * option to report all warnings as errors.
59 */
60 enum Kind {
61 /**
62 * Problem which prevents the tool's normal completion.
63 */
|
23 * questions.
24 */
25
26 package jdk.nashorn.api.tree;
27
28 /**
29 * Interface for diagnostics from tools. A diagnostic usually reports
30 * a problem at a specific position in a source file. However, not
31 * all diagnostics are associated with a position or a file.
32 *
33 * <p>A position is a zero-based character offset from the beginning of
34 * a file. Negative values (except {@link #NOPOS}) are not valid
35 * positions.
36 *
37 * <p>Line and column numbers begin at 1. Negative values (except
38 * {@link #NOPOS}) and 0 are not valid line or column numbers.
39 *
40 * <p>Line terminator is as defined in ECMAScript specification which is one
41 * of { \u000A, \u000B, \u2028, \u2029 }.
42 *
43 * @since 9
44 */
45 @jdk.Exported
46 public interface Diagnostic {
47
48 /**
49 * Kinds of diagnostics, for example, error or warning.
50 *
51 * The kind of a diagnostic can be used to determine how the
52 * diagnostic should be presented to the user. For example,
53 * errors might be colored red or prefixed with the word "Error",
54 * while warnings might be colored yellow or prefixed with the
55 * word "Warning". There is no requirement that the Kind
56 * should imply any inherent semantic meaning to the message
57 * of the diagnostic: for example, a tool might provide an
58 * option to report all warnings as errors.
59 */
60 enum Kind {
61 /**
62 * Problem which prevents the tool's normal completion.
63 */
|