public override object VisitForeignTypeDef(PParser.ForeignTypeDefContext context) { string symbolName = context.name.GetText(); TypeDef typeDef = CurrentScope.Put(symbolName, context); nodesToDeclarations.Put(context, typeDef); return(null); }
public override object VisitForeignTypeDef(PParser.ForeignTypeDefContext context) { // TYPE name=iden var typedef = (TypeDef)nodesToDeclarations.Get(context); // SEMI typedef.Type = new ForeignType(typedef.Name); return(typedef); }
internal TypeDef Put(string name, PParser.ForeignTypeDefContext tree) { TypeDef typedef = new TypeDef(name, tree); CheckConflicts(typedef, Namespace(typedefs), Namespace(enums), Namespace(interfaces), Namespace(machines)); typedefs.Add(name, typedef); return(typedef); }