5 public class ASTSpecifier : ASTNode
12 //OldList * templateArgs;
14 Expression expression;
16 TemplateParameter templateParameter;
21 public class SpecsList : ASTList<ASTSpecifier>
30 SpecsList specs = null;
35 if(nextToken.type == STRUCT || nextToken.type == UNION)
37 ASTSpecifier s = SpecClass::parse();
40 if(!specs) specs = { };
45 else if(nextToken.type.isSpecifier)
48 if(!specs) specs = { };
49 specs.Add(SpecBase { specifier = token.type });
50 if(!token.type.isQualifier)
53 else if(nextToken.type == IDENTIFIER)
56 if(isType || !gotSpec)
59 if(!specs) specs = { };
60 specs.Add(SpecName { name = CopyString(token.text) });
73 public class SpecBase : ASTSpecifier
83 public class SpecName : ASTSpecifier
93 public class ASTEnumerator : struct
100 public class SpecClass : ASTSpecifier
104 List<ASTEnumerator> enumerators;
106 ClassDefList definitions;
109 // ExtDecl extDeclStruct;
114 spec.type = readToken().type;
115 if(peekToken().type == IDENTIFIER)
116 spec.id = ASTIdentifier::parse();
117 if(peekToken().type == '{')
120 spec.definitions = ClassDefList::parse();
121 if(peekToken().type == '}')
144 public class Attribute : struct
147 Attribute prev, next;
153 public class Attrib : struct
161 public class ExtDecl : struct