Esempio n. 1
0
        public override void ExitVarSpec(GolangParser.VarSpecContext context)
        {
            // varSpec
            //     : identifierList ( type ( '=' expressionList ) ? | '=' expressionList )

            if (m_varIdentifierCount == 0 && m_varMultipleDeclaration)
            {
                m_targetFile.Append(RemoveFirstLineFeed(CheckForCommentsLeft(context)));
            }

            if (!Identifiers.TryGetValue(context.identifierList(), out string[] identifiers))
Esempio n. 2
0
        public override void ExitVarSpec(GolangParser.VarSpecContext context)
        {
            // varSpec
            //     : identifierList(type('=' expressionList) ? | '=' expressionList)

            if (m_firstVarSpec)
            {
                m_firstVarSpec = false;

                string comments = CheckForCommentsLeft(context, preserveLineFeeds: m_inFunction);

                if (!string.IsNullOrEmpty(comments))
                {
                    m_targetFile.Append(FixForwardSpacing(comments));
                }
            }

            if (!Identifiers.TryGetValue(context.identifierList(), out string[] identifiers))
Esempio n. 3
0
 public override void ExitVarSpec(GolangParser.VarSpecContext context)
 {
     if (Identifiers.TryGetValue(context.identifierList(), out string[] identifiers))