blob: 3f19f03bf52bd7e7dcf13927806c1b9571f90f92 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
/**********************************************************************
* Copyright (c) 2002,2003 Rational Software Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Common Public License v0.5
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/cpl-v05.html
*
* Contributors:
* IBM Rational Software - Initial API and implementation
***********************************************************************/
package org.eclipse.cdt.core.parser;
/**
* @author jcamelon
*/
public class ParseError extends Error {
private final ParseErrorKind errorKind;
public static class ParseErrorKind extends Enum
{
// the method called is not implemented in this particular implementation
public static final ParseErrorKind METHOD_NOT_IMPLEMENTED = new ParseErrorKind( 0 );
// offset specified is within a section of code #if'd out by the preprocessor
// semantic context cannot be provided in this case
public static final ParseErrorKind OFFSETDUPLE_UNREACHABLE = new ParseErrorKind( 1 );
// offset range specified is not a valid identifier or qualified name
// semantic context cannot be provided in this case
public static final ParseErrorKind OFFSET_RANGE_NOT_NAME = new ParseErrorKind( 2 );
/**
* @param enumValue
*/
protected ParseErrorKind(int enumValue) {
super(enumValue);
}
}
public ParseErrorKind getErrorKind()
{
return errorKind;
}
public ParseError( ParseErrorKind kind )
{
errorKind = kind;
}
}
|