|
Lines 1-19
Link Here
|
| 1 |
/******************************************************************************* |
1 |
/******************************************************************************* |
| 2 |
* Copyright (c) 2004, 2005 IBM Corporation and others. |
2 |
* Copyright (c) 2004, 2008 IBM Corporation and others. |
| 3 |
* All rights reserved. This program and the accompanying materials |
3 |
* All rights reserved. This program and the accompanying materials |
| 4 |
* are made available under the terms of the Eclipse Public License v1.0 |
4 |
* are made available under the terms of the Eclipse Public License v1.0 |
| 5 |
* which accompanies this distribution, and is available at |
5 |
* which accompanies this distribution, and is available at |
| 6 |
* http://www.eclipse.org/legal/epl-v10.html |
6 |
* http://www.eclipse.org/legal/epl-v10.html |
| 7 |
* |
7 |
* |
| 8 |
* Contributors: |
8 |
* Contributors: |
| 9 |
* IBM - Initial API and implementation |
9 |
* Doug Schaefer (IBM) - Initial API and implementation |
|
|
10 |
* Markus Schorn (Wind River Systems) |
| 10 |
*******************************************************************************/ |
11 |
*******************************************************************************/ |
| 11 |
package org.eclipse.cdt.core.dom.ast; |
12 |
package org.eclipse.cdt.core.dom.ast; |
| 12 |
|
13 |
|
| 13 |
/** |
14 |
/** |
| 14 |
* This expression represents a literal in the program. |
15 |
* This expression represents a literal in the program. |
| 15 |
* |
16 |
* |
| 16 |
* @author Doug Schaefer |
17 |
* @noimplement This interface is not intended to be implemented by clients. |
| 17 |
*/ |
18 |
*/ |
| 18 |
public interface IASTLiteralExpression extends IASTExpression { |
19 |
public interface IASTLiteralExpression extends IASTExpression { |
| 19 |
|
20 |
|
|
Lines 28-66
Link Here
|
| 28 |
public static final int lk_float_constant = 1; |
29 |
public static final int lk_float_constant = 1; |
| 29 |
|
30 |
|
| 30 |
/** |
31 |
/** |
| 31 |
* A char literal e.g. 'abc' |
32 |
* A char literal e.g. 'a' |
| 32 |
*/ |
33 |
*/ |
| 33 |
public static final int lk_char_constant = 2; |
34 |
public static final int lk_char_constant = 2; |
| 34 |
|
35 |
|
| 35 |
/** |
36 |
/** |
| 36 |
* A string literal e.g. "abcdefg" |
37 |
* A string literal e.g. "a literal" |
| 37 |
*/ |
38 |
*/ |
| 38 |
public static final int lk_string_literal = 3; |
39 |
public static final int lk_string_literal = 3; |
| 39 |
|
40 |
|
| 40 |
/** |
41 |
/** |
| 41 |
* A constant defined for subclasses to extend from. |
42 |
* A constant defined for subclasses to extend from. |
|
|
43 |
* @deprecated all possible values must be defined in {@link IASTLiteralExpression}. |
| 42 |
*/ |
44 |
*/ |
|
|
45 |
@Deprecated |
| 43 |
public static final int lk_last = lk_string_literal; |
46 |
public static final int lk_last = lk_string_literal; |
| 44 |
|
47 |
|
| 45 |
/** |
48 |
/** |
|
|
49 |
* <code>lk_this</code> represents the 'this' keyword for c++ only. |
| 50 |
* @since 5.1 |
| 51 |
*/ |
| 52 |
public static final int lk_this = 4; |
| 53 |
|
| 54 |
/** |
| 55 |
* <code>lk_true</code> represents the 'true' keyword. |
| 56 |
* @since 5.1 |
| 57 |
*/ |
| 58 |
public static final int lk_true = 5; |
| 59 |
|
| 60 |
/** |
| 61 |
* <code>lk_false</code> represents the 'false' keyword. |
| 62 |
* @since 5.1 |
| 63 |
*/ |
| 64 |
public static final int lk_false = 6; |
| 65 |
|
| 66 |
/** |
| 46 |
* Get the literal expression kind. |
67 |
* Get the literal expression kind. |
| 47 |
* |
|
|
| 48 |
* @return int |
| 49 |
*/ |
68 |
*/ |
| 50 |
public int getKind(); |
69 |
public int getKind(); |
| 51 |
|
70 |
|
| 52 |
/** |
71 |
/** |
|
|
72 |
* Returns the value of the literal as char-array. |
| 73 |
* @since 5.1 |
| 74 |
*/ |
| 75 |
public char[] getValue(); |
| 76 |
|
| 77 |
/** |
| 78 |
* Returns the value of the literal as string. |
| 79 |
* @since 5.1 |
| 80 |
*/ |
| 81 |
public String toString(); |
| 82 |
|
| 83 |
/** |
| 53 |
* Set the literal expression kind. |
84 |
* Set the literal expression kind. |
| 54 |
* |
|
|
| 55 |
* @param value |
| 56 |
* int |
| 57 |
*/ |
85 |
*/ |
| 58 |
public void setKind(int value); |
86 |
public void setKind(int value); |
| 59 |
|
87 |
|
| 60 |
/** |
88 |
/** |
| 61 |
* Set the value of the literal expression. |
89 |
* Provide the value for the expression. |
| 62 |
* |
90 |
* @since 5.1 |
| 63 |
* @param value |
91 |
*/ |
|
|
92 |
public void setValue(char[] value); |
| 93 |
|
| 94 |
/** |
| 95 |
* @deprecated, use {@link #setValue(char[])}, instead. |
| 64 |
*/ |
96 |
*/ |
| 65 |
public void setValue(String value); |
97 |
public void setValue(String value); |
| 66 |
|
98 |
|