Example #1
0
        public static void Rule(Clause lhs, OptionalProcedureComments optionalProcedureComments, Term term, OptionalRuleBody optionalBody)
        {
            var comments = optionalProcedureComments.Comments ??
                           (IEnumerable<CodeComment>) new CodeComment[] {};

            var codeCompoundTerms = optionalBody.CodeCompoundTerms ??
                                    (IEnumerable<CodeCompoundTerm>) new CodeCompoundTerm[] {};

            lhs.CodeSentence = new CodeSentence(comments, term.CodeCompoundTerm, codeCompoundTerms);
        }
Example #2
0
        public static void Rule(Clause lhs, OptionalProcedureComments optionalProcedureComments, Term term, OptionalRuleBody optionalBody)
        {
            IEnumerable<CodeComment> comments = optionalProcedureComments.Comments;
            if (comments == null)
            {
                comments = new CodeComment[] { };
            }

            IEnumerable<CodeCompoundTerm> codeCompoundTerms = optionalBody.CodeCompoundTerms;
            if (codeCompoundTerms == null)
            {
                codeCompoundTerms = new CodeCompoundTerm[] { };
            }

            lhs.CodeSentence = new CodeSentence(comments, term.CodeCompoundTerm, codeCompoundTerms);
        }
Example #3
0
 public static void Rule(OptionalRuleBody lhs)
 {
 }
Example #4
0
 public static void Rule(OptionalRuleBody lhs, ColonDash colonDash, StatementElement statementElement, AdditionalStatementElements additionalStatementElements)
 {
     lhs.CodeCompoundTerms = new List <CodeCompoundTerm>();
     lhs.CodeCompoundTerms.Add(statementElement.CodeCompoundTerm);
     lhs.CodeCompoundTerms.AddRange(additionalStatementElements.CodeCompoundTerms);
 }
Example #5
0
        public static void Rule(Clause lhs, OptionalProcedureComments optionalProcedureComments, Term term, OptionalRuleBody optionalBody)
        {
            IEnumerable <CodeComment> comments = optionalProcedureComments.Comments;

            if (comments == null)
            {
                comments = new CodeComment[] { };
            }

            IEnumerable <CodeCompoundTerm> codeCompoundTerms = optionalBody.CodeCompoundTerms;

            if (codeCompoundTerms == null)
            {
                codeCompoundTerms = new CodeCompoundTerm[] { };
            }

            lhs.CodeSentence = new CodeSentence(comments, term.CodeCompoundTerm, codeCompoundTerms);
        }
 public static void Rule(OptionalRuleBody lhs)
 { }
 public static void Rule(OptionalRuleBody lhs, ColonDash colonDash, StatementElement statementElement, AdditionalStatementElements additionalStatementElements)
 {
     lhs.CodeCompoundTerms = new List<CodeCompoundTerm>();
     lhs.CodeCompoundTerms.Add(statementElement.CodeCompoundTerm);
     lhs.CodeCompoundTerms.AddRange(additionalStatementElements.CodeCompoundTerms);
 }
Example #8
0
        public static void Rule(Clause lhs, OptionalProcedureComments optionalProcedureComments, Term term, OptionalRuleBody optionalBody)
        {
            var comments = optionalProcedureComments.Comments ??
                           (IEnumerable <CodeComment>) new CodeComment[] {};

            var codeCompoundTerms = optionalBody.CodeCompoundTerms ??
                                    (IEnumerable <CodeCompoundTerm>) new CodeCompoundTerm[] {};

            lhs.CodeSentence = new CodeSentence(comments, term.CodeCompoundTerm, codeCompoundTerms);
        }