public override void ExitStructType(GolangParser.StructTypeContext context) { // TODO: Turn into a strongly typed object and declare prior to function // All intra-function scoped declared structures are // defined as dynamic so they can behave like ducks Types[context.Parent.Parent] = TypeInfo.DynamicType; }
public override void ExitStructType(GolangParser.StructTypeContext context) { List <FieldInfo> fields = new List <FieldInfo>(); for (int i = 0; i < context.fieldDecl().Length; i++) { GolangParser.FieldDeclContext fieldDecl = context.fieldDecl(i); string description = ToStringLiteral(fieldDecl.STRING_LIT()?.GetText()); if (Identifiers.TryGetValue(fieldDecl.identifierList(), out string[] identifiers) && Types.TryGetValue(fieldDecl.type(), out TypeInfo typeInfo))
public override void ExitStructType(GolangParser.StructTypeContext context) { // All intra-function scoped declared structures are // defined as dynamic so they can behave like ducks Types[context.Parent.Parent] = TypeInfo.DynamicType; }