示例#1
0
        private void AnalyzeExternalDeclaration(
            CParser.ExternalDeclarationContext externalDeclaration)
        {
            var functionDefinition = externalDeclaration.functionDefinition();
            var declaration        = externalDeclaration.declaration();

            if (functionDefinition != null)
            {
                AnalyzeFunctionDefinition(functionDefinition);
            }
            else if (declaration != null)
            {
                AnalyzeDeclaration(declaration);
            }
        }
示例#2
0
        protected void GenerateExternalDeclaration(
            CParser.ExternalDeclarationContext externalDeclaration)
        {
            var functionDefinition = externalDeclaration.functionDefinition();
            var declaration        = externalDeclaration.declaration();

            if (functionDefinition != null)
            {
                GenerateFunctionDefinition(functionDefinition);
            }
            else if (declaration != null)
            {
                GenerateDeclaration(declaration);
            }
        }