public override void EnterTypeDecl(GolangParser.TypeDeclContext context) { // typeDecl // : 'type' ( typeSpec | '(' ( typeSpec eos )* ')' ) m_typeIdentifierCount = 0; m_typeMultipleDeclaration = context.children.Count > 2; }
public override void ExitTypeDecl(GolangParser.TypeDeclContext context) { // typeDecl // : 'type' ( typeSpec | '(' ( typeSpec eos )* ')' ) if (m_typeMultipleDeclaration && EndsWithLineFeed(m_targetFile.ToString())) { string removedLineFeed = RemoveLastLineFeed(m_targetFile.ToString()); m_targetFile.Clear(); m_targetFile.Append(removedLineFeed); } }
// TODO: Consider strongly typing sub-function type declarations with function name prefix declared directly prior to function definition - sub-function type declarations are syntactically invalid in C# public override void EnterTypeDecl(GolangParser.TypeDeclContext context) { m_firstTypeSpec = !m_inFunction; }