mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-09 17:25:38 +02:00
Patch for John Camelon:
- see ChangeLogs
This commit is contained in:
parent
ef11178134
commit
f4b27bf0ee
10 changed files with 269 additions and 109 deletions
|
@ -17,7 +17,6 @@ import org.eclipse.cdt.core.model.ICElement;
|
||||||
import org.eclipse.cdt.internal.core.parser.IParserCallback;
|
import org.eclipse.cdt.internal.core.parser.IParserCallback;
|
||||||
import org.eclipse.cdt.internal.core.parser.Token;
|
import org.eclipse.cdt.internal.core.parser.Token;
|
||||||
import org.eclipse.cdt.internal.core.parser.util.DeclSpecifier;
|
import org.eclipse.cdt.internal.core.parser.util.DeclSpecifier;
|
||||||
import org.eclipse.cdt.internal.core.parser.util.DeclarationSpecifier;
|
|
||||||
import org.eclipse.cdt.internal.core.parser.util.Name;
|
import org.eclipse.cdt.internal.core.parser.util.Name;
|
||||||
|
|
||||||
public class NewModelBuilder implements IParserCallback {
|
public class NewModelBuilder implements IParserCallback {
|
||||||
|
@ -86,7 +85,7 @@ public class NewModelBuilder implements IParserCallback {
|
||||||
* @see org.eclipse.cdt.core.newparser.IParserCallback#beginDeclarator()
|
* @see org.eclipse.cdt.core.newparser.IParserCallback#beginDeclarator()
|
||||||
*/
|
*/
|
||||||
public Object declaratorBegin(Object container) {
|
public Object declaratorBegin(Object container) {
|
||||||
DeclarationSpecifier.Container declSpec = (DeclarationSpecifier.Container)container;
|
DeclSpecifier.Container declSpec = (DeclSpecifier.Container)container;
|
||||||
List declarators = declSpec.getDeclarators();
|
List declarators = declSpec.getDeclarators();
|
||||||
Declarator declarator =new Declarator();
|
Declarator declarator =new Declarator();
|
||||||
declarators.add( declarator );
|
declarators.add( declarator );
|
||||||
|
@ -294,11 +293,23 @@ org.eclipse.cdt.internal.core.newparser.IParserCallback#beginSimpleDeclaration(T
|
||||||
* @see org.eclipse.cdt.internal.core.newparser.IParserCallback#declaratorAbort(java.lang.Object, java.lang.Object)
|
* @see org.eclipse.cdt.internal.core.newparser.IParserCallback#declaratorAbort(java.lang.Object, java.lang.Object)
|
||||||
*/
|
*/
|
||||||
public void declaratorAbort(Object container, Object declarator) {
|
public void declaratorAbort(Object container, Object declarator) {
|
||||||
DeclarationSpecifier.Container declSpec = (DeclarationSpecifier.Container)container;
|
DeclSpecifier.Container declSpec = (DeclSpecifier.Container)container;
|
||||||
Declarator toBeRemoved =(Declarator)declarator;
|
Declarator toBeRemoved =(Declarator)declarator;
|
||||||
declSpec.removeDeclarator( toBeRemoved );
|
declSpec.removeDeclarator( toBeRemoved );
|
||||||
toBeRemoved = null;
|
toBeRemoved = null;
|
||||||
currName = null;
|
currName = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#expressionBegin(java.lang.Object)
|
||||||
|
*/
|
||||||
|
public Object expressionBegin(Object container) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#expressionEnd(java.lang.Object)
|
||||||
|
*/
|
||||||
|
public void expressionEnd(Object expression) {
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,6 @@ import java.util.LinkedList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.eclipse.cdt.internal.core.parser.util.DeclSpecifier;
|
import org.eclipse.cdt.internal.core.parser.util.DeclSpecifier;
|
||||||
import org.eclipse.cdt.internal.core.parser.util.DeclarationSpecifier;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author jcamelon
|
* @author jcamelon
|
||||||
|
@ -14,16 +13,16 @@ import org.eclipse.cdt.internal.core.parser.util.DeclarationSpecifier;
|
||||||
* To enable and disable the creation of type comments go to
|
* To enable and disable the creation of type comments go to
|
||||||
* Window>Preferences>Java>Code Generation.
|
* Window>Preferences>Java>Code Generation.
|
||||||
*/
|
*/
|
||||||
public class Parameter extends DeclSpecifier implements DeclarationSpecifier.Container
|
public class Parameter extends DeclSpecifier implements DeclSpecifier.Container
|
||||||
{
|
{
|
||||||
DeclarationSpecifier declSpec = null;
|
DeclSpecifier declSpec = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see org.eclipse.cdt.internal.core.dom.DeclarationSpecifier.CElementWrapper#getDeclSpecifier()
|
* @see org.eclipse.cdt.internal.core.dom.DeclarationSpecifier.CElementWrapper#getDeclSpecifier()
|
||||||
*/
|
*/
|
||||||
public DeclarationSpecifier getDeclSpecifier() {
|
public DeclSpecifier getDeclSpecifier() {
|
||||||
if( declSpec == null )
|
if( declSpec == null )
|
||||||
declSpec = new DeclarationSpecifier();
|
declSpec = new DeclSpecifier();
|
||||||
|
|
||||||
return declSpec;
|
return declSpec;
|
||||||
}
|
}
|
||||||
|
@ -31,7 +30,7 @@ public class Parameter extends DeclSpecifier implements DeclarationSpecifier.Con
|
||||||
/**
|
/**
|
||||||
* @see org.eclipse.cdt.internal.core.dom.DeclarationSpecifier.CElementWrapper#setDeclSpecifier(org.eclipse.cdt.internal.core.dom.DeclarationSpecifier)
|
* @see org.eclipse.cdt.internal.core.dom.DeclarationSpecifier.CElementWrapper#setDeclSpecifier(org.eclipse.cdt.internal.core.dom.DeclarationSpecifier)
|
||||||
*/
|
*/
|
||||||
public void setDeclSpecifier(DeclarationSpecifier in) {
|
public void setDeclSpecifier(DeclSpecifier in) {
|
||||||
declSpec = in;
|
declSpec = in;
|
||||||
}
|
}
|
||||||
private List declarators = new LinkedList();
|
private List declarators = new LinkedList();
|
||||||
|
|
|
@ -6,7 +6,6 @@ import java.util.List;
|
||||||
import org.eclipse.cdt.core.model.IStructure;
|
import org.eclipse.cdt.core.model.IStructure;
|
||||||
import org.eclipse.cdt.core.model.ITranslationUnit;
|
import org.eclipse.cdt.core.model.ITranslationUnit;
|
||||||
import org.eclipse.cdt.internal.core.parser.util.DeclSpecifier;
|
import org.eclipse.cdt.internal.core.parser.util.DeclSpecifier;
|
||||||
import org.eclipse.cdt.internal.core.parser.util.DeclarationSpecifier;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author jcamelon
|
* @author jcamelon
|
||||||
|
@ -16,7 +15,7 @@ import org.eclipse.cdt.internal.core.parser.util.DeclarationSpecifier;
|
||||||
* To enable and disable the creation of type comments go to
|
* To enable and disable the creation of type comments go to
|
||||||
* Window>Preferences>Java>Code Generation.
|
* Window>Preferences>Java>Code Generation.
|
||||||
*/
|
*/
|
||||||
public class SimpleDeclarationWrapper extends DeclSpecifier implements DeclarationSpecifier.Container, ICElementWrapper {
|
public class SimpleDeclarationWrapper extends DeclSpecifier implements DeclSpecifier.Container, ICElementWrapper {
|
||||||
|
|
||||||
private CElement element = null;
|
private CElement element = null;
|
||||||
private CElement parent = null;
|
private CElement parent = null;
|
||||||
|
@ -137,14 +136,14 @@ public class SimpleDeclarationWrapper extends DeclSpecifier implements Declarati
|
||||||
return declarators;
|
return declarators;
|
||||||
}
|
}
|
||||||
|
|
||||||
DeclarationSpecifier declSpec = null;
|
DeclSpecifier declSpec = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see org.eclipse.cdt.internal.core.dom.DeclarationSpecifier.CElementWrapper#getDeclSpecifier()
|
* @see org.eclipse.cdt.internal.core.dom.DeclarationSpecifier.CElementWrapper#getDeclSpecifier()
|
||||||
*/
|
*/
|
||||||
public DeclarationSpecifier getDeclSpecifier() {
|
public DeclSpecifier getDeclSpecifier() {
|
||||||
if( declSpec == null )
|
if( declSpec == null )
|
||||||
declSpec = new DeclarationSpecifier();
|
declSpec = new DeclSpecifier();
|
||||||
|
|
||||||
return declSpec;
|
return declSpec;
|
||||||
}
|
}
|
||||||
|
@ -152,7 +151,7 @@ public class SimpleDeclarationWrapper extends DeclSpecifier implements Declarati
|
||||||
/**
|
/**
|
||||||
* @see org.eclipse.cdt.internal.core.dom.DeclarationSpecifier.CElementWrapper#setDeclSpecifier(org.eclipse.cdt.internal.core.dom.DeclarationSpecifier)
|
* @see org.eclipse.cdt.internal.core.dom.DeclarationSpecifier.CElementWrapper#setDeclSpecifier(org.eclipse.cdt.internal.core.dom.DeclarationSpecifier)
|
||||||
*/
|
*/
|
||||||
public void setDeclSpecifier(DeclarationSpecifier in) {
|
public void setDeclSpecifier(DeclSpecifier in) {
|
||||||
declSpec = in;
|
declSpec = in;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@ package org.eclipse.cdt.internal.core.parser;
|
||||||
import java.util.EmptyStackException;
|
import java.util.EmptyStackException;
|
||||||
import java.util.Stack;
|
import java.util.Stack;
|
||||||
|
|
||||||
public class ExpressionEvaluator extends NullParserCallback {
|
public class ExpressionEvaluator implements IParserCallback {
|
||||||
|
|
||||||
public class ExpressionException extends Exception {
|
public class ExpressionException extends Exception {
|
||||||
public ExpressionException(String msg) {
|
public ExpressionException(String msg) {
|
||||||
|
@ -108,5 +108,165 @@ public class ExpressionEvaluator extends NullParserCallback {
|
||||||
public Object getResult() throws EmptyStackException {
|
public Object getResult() throws EmptyStackException {
|
||||||
return stack.peek();
|
return stack.peek();
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#translationUnitBegin()
|
||||||
|
*/
|
||||||
|
public Object translationUnitBegin() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#translationUnitEnd(java.lang.Object)
|
||||||
|
*/
|
||||||
|
public void translationUnitEnd(Object unit) {
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#inclusionBegin(java.lang.String, int)
|
||||||
|
*/
|
||||||
|
public void inclusionBegin(String includeFile, int offset) {
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#inclusionEnd()
|
||||||
|
*/
|
||||||
|
public void inclusionEnd() {
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#macro(java.lang.String, int)
|
||||||
|
*/
|
||||||
|
public void macro(String macroName, int offset) {
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#simpleDeclarationBegin(java.lang.Object)
|
||||||
|
*/
|
||||||
|
public Object simpleDeclarationBegin(Object Container) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#simpleDeclarationEnd(java.lang.Object)
|
||||||
|
*/
|
||||||
|
public void simpleDeclarationEnd(Object declaration) {
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#parameterDeclarationBegin(java.lang.Object)
|
||||||
|
*/
|
||||||
|
public Object parameterDeclarationBegin(Object Container) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#parameterDeclarationEnd(java.lang.Object)
|
||||||
|
*/
|
||||||
|
public void parameterDeclarationEnd(Object declaration) {
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#simpleDeclSpecifier(java.lang.Object, org.eclipse.cdt.internal.core.parser.Token)
|
||||||
|
*/
|
||||||
|
public void simpleDeclSpecifier(Object Container, Token specifier) {
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#nameBegin(org.eclipse.cdt.internal.core.parser.Token)
|
||||||
|
*/
|
||||||
|
public void nameBegin(Token firstToken) {
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#nameEnd(org.eclipse.cdt.internal.core.parser.Token)
|
||||||
|
*/
|
||||||
|
public void nameEnd(Token lastToken) {
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#declaratorBegin(java.lang.Object)
|
||||||
|
*/
|
||||||
|
public Object declaratorBegin(Object container) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#declaratorId(java.lang.Object)
|
||||||
|
*/
|
||||||
|
public void declaratorId(Object declarator) {
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#declaratorAbort(java.lang.Object, java.lang.Object)
|
||||||
|
*/
|
||||||
|
public void declaratorAbort(Object container, Object declarator) {
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#declaratorEnd(java.lang.Object)
|
||||||
|
*/
|
||||||
|
public void declaratorEnd(Object declarator) {
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#argumentsBegin(java.lang.Object)
|
||||||
|
*/
|
||||||
|
public Object argumentsBegin(Object declarator) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#argumentsEnd(java.lang.Object)
|
||||||
|
*/
|
||||||
|
public void argumentsEnd(Object parameterDeclarationClause) {
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#functionBodyBegin()
|
||||||
|
*/
|
||||||
|
public void functionBodyBegin() {
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#functionBodyEnd()
|
||||||
|
*/
|
||||||
|
public void functionBodyEnd() {
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#classSpecifierBegin(java.lang.Object, org.eclipse.cdt.internal.core.parser.Token)
|
||||||
|
*/
|
||||||
|
public Object classSpecifierBegin(Object container, Token classKey) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#classSpecifierName(java.lang.Object)
|
||||||
|
*/
|
||||||
|
public void classSpecifierName(Object classSpecifier) {
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#classSpecifierEnd(java.lang.Object)
|
||||||
|
*/
|
||||||
|
public void classSpecifierEnd(Object classSpecifier) {
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#baseSpecifierBegin(java.lang.Object)
|
||||||
|
*/
|
||||||
|
public Object baseSpecifierBegin(Object containingClassSpec) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#baseSpecifierName(java.lang.Object)
|
||||||
|
*/
|
||||||
|
public void baseSpecifierName(Object baseSpecifier) {
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#baseSpecifierVisibility(java.lang.Object, org.eclipse.cdt.internal.core.parser.Token)
|
||||||
|
*/
|
||||||
|
public void baseSpecifierVisibility(
|
||||||
|
Object baseSpecifier,
|
||||||
|
Token visibility) {
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#baseSpecifierVirtual(java.lang.Object, boolean)
|
||||||
|
*/
|
||||||
|
public void baseSpecifierVirtual(Object baseSpecifier, boolean virtual) {
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#baseSpecifierEnd(java.lang.Object)
|
||||||
|
*/
|
||||||
|
public void baseSpecifierEnd(Object baseSpecifier) {
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#expressionBegin(java.lang.Object)
|
||||||
|
*/
|
||||||
|
public Object expressionBegin(Object container) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#expressionEnd(java.lang.Object)
|
||||||
|
*/
|
||||||
|
public void expressionEnd(Object expression) {
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,7 +38,6 @@ public interface IParserCallback {
|
||||||
public Object argumentsBegin( Object declarator );
|
public Object argumentsBegin( Object declarator );
|
||||||
public void argumentsEnd(Object parameterDeclarationClause);
|
public void argumentsEnd(Object parameterDeclarationClause);
|
||||||
|
|
||||||
|
|
||||||
public void functionBodyBegin();
|
public void functionBodyBegin();
|
||||||
public void functionBodyEnd();
|
public void functionBodyEnd();
|
||||||
|
|
||||||
|
@ -52,6 +51,8 @@ public interface IParserCallback {
|
||||||
public void baseSpecifierVirtual( Object baseSpecifier, boolean virtual );
|
public void baseSpecifierVirtual( Object baseSpecifier, boolean virtual );
|
||||||
public void baseSpecifierEnd( Object baseSpecifier );
|
public void baseSpecifierEnd( Object baseSpecifier );
|
||||||
|
|
||||||
|
public Object expressionBegin( Object container );
|
||||||
public void expressionOperator(Token operator) throws Exception;
|
public void expressionOperator(Token operator) throws Exception;
|
||||||
public void expressionTerminal(Token terminal) throws Exception;
|
public void expressionTerminal(Token terminal) throws Exception;
|
||||||
|
public void expressionEnd(Object expression );
|
||||||
}
|
}
|
||||||
|
|
|
@ -172,4 +172,16 @@ public class NullParserCallback implements IParserCallback {
|
||||||
public void declaratorAbort(Object container, Object declarator) {
|
public void declaratorAbort(Object container, Object declarator) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#expressionBegin(java.lang.Object)
|
||||||
|
*/
|
||||||
|
public Object expressionBegin(Object container) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @see org.eclipse.cdt.internal.core.parser.IParserCallback#expressionEnd(java.lang.Object)
|
||||||
|
*/
|
||||||
|
public void expressionEnd(Object expression) {
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -437,16 +437,6 @@ c, quick);
|
||||||
// doNothing
|
// doNothing
|
||||||
}
|
}
|
||||||
|
|
||||||
// assignmentExpression || { initializerList , } || { }
|
|
||||||
try
|
|
||||||
{
|
|
||||||
assignmentExpression();
|
|
||||||
}
|
|
||||||
catch( Backtrack b )
|
|
||||||
{
|
|
||||||
// doNothing
|
|
||||||
}
|
|
||||||
|
|
||||||
if (LT(1) == Token.tLBRACE) {
|
if (LT(1) == Token.tLBRACE) {
|
||||||
// for now, just consume to matching brace
|
// for now, just consume to matching brace
|
||||||
consume();
|
consume();
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
package org.eclipse.cdt.internal.core.parser.util;
|
package org.eclipse.cdt.internal.core.parser.util;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
import org.eclipse.cdt.internal.core.parser.Token;
|
import org.eclipse.cdt.internal.core.parser.Token;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -141,19 +143,19 @@ public class DeclSpecifier {
|
||||||
setVolatile(true);
|
setVolatile(true);
|
||||||
break;
|
break;
|
||||||
case Token.t_char:
|
case Token.t_char:
|
||||||
setType(DeclarationSpecifier.t_char);
|
setType(DeclSpecifier.t_char);
|
||||||
break;
|
break;
|
||||||
case Token.t_wchar_t:
|
case Token.t_wchar_t:
|
||||||
setType(DeclarationSpecifier.t_wchar_t);
|
setType(DeclSpecifier.t_wchar_t);
|
||||||
break;
|
break;
|
||||||
case Token.t_bool:
|
case Token.t_bool:
|
||||||
setType(DeclarationSpecifier.t_bool);
|
setType(DeclSpecifier.t_bool);
|
||||||
break;
|
break;
|
||||||
case Token.t_short:
|
case Token.t_short:
|
||||||
setShort(true);
|
setShort(true);
|
||||||
break;
|
break;
|
||||||
case Token.t_int:
|
case Token.t_int:
|
||||||
setType(DeclarationSpecifier.t_int);
|
setType(DeclSpecifier.t_int);
|
||||||
break;
|
break;
|
||||||
case Token.t_long:
|
case Token.t_long:
|
||||||
setLong(true);
|
setLong(true);
|
||||||
|
@ -165,16 +167,16 @@ public class DeclSpecifier {
|
||||||
setUnsigned(true);
|
setUnsigned(true);
|
||||||
break;
|
break;
|
||||||
case Token.t_float:
|
case Token.t_float:
|
||||||
setType(DeclarationSpecifier.t_float);
|
setType(DeclSpecifier.t_float);
|
||||||
break;
|
break;
|
||||||
case Token.t_double:
|
case Token.t_double:
|
||||||
setType(DeclarationSpecifier.t_double);
|
setType(DeclSpecifier.t_double);
|
||||||
break;
|
break;
|
||||||
case Token.t_void:
|
case Token.t_void:
|
||||||
setType(DeclarationSpecifier.t_void);
|
setType(DeclSpecifier.t_void);
|
||||||
break;
|
break;
|
||||||
case Token.tIDENTIFIER:
|
case Token.tIDENTIFIER:
|
||||||
setType(DeclarationSpecifier.t_type);
|
setType(DeclSpecifier.t_type);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -188,4 +190,16 @@ public class DeclSpecifier {
|
||||||
return declSpecifierSeq & typeMask;
|
return declSpecifierSeq & typeMask;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public interface Container {
|
||||||
|
|
||||||
|
public DeclSpecifier getDeclSpecifier();
|
||||||
|
|
||||||
|
public void setDeclSpecifier( DeclSpecifier in );
|
||||||
|
|
||||||
|
public void addDeclarator(Object declarator);
|
||||||
|
public void removeDeclarator( Object declarator );
|
||||||
|
public List getDeclarators();
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,26 +0,0 @@
|
||||||
package org.eclipse.cdt.internal.core.parser.util;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author jcamelon
|
|
||||||
*
|
|
||||||
* To change this generated comment edit the template variable "typecomment":
|
|
||||||
* Window>Preferences>Java>Templates.
|
|
||||||
* To enable and disable the creation of type comments go to
|
|
||||||
* Window>Preferences>Java>Code Generation.
|
|
||||||
*/
|
|
||||||
public class DeclarationSpecifier extends DeclSpecifier {
|
|
||||||
|
|
||||||
public interface Container {
|
|
||||||
|
|
||||||
public DeclarationSpecifier getDeclSpecifier();
|
|
||||||
|
|
||||||
public void setDeclSpecifier( DeclarationSpecifier in );
|
|
||||||
|
|
||||||
public void addDeclarator(Object declarator);
|
|
||||||
public void removeDeclarator( Object declarator );
|
|
||||||
public List getDeclarators();
|
|
||||||
|
|
||||||
};
|
|
||||||
}
|
|
Loading…
Add table
Reference in a new issue