コード例 #1
0
ファイル: Clause.cs プロジェクト: wallymathieu/Prolog.NET
        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);
        }
コード例 #2
0
ファイル: Clause.cs プロジェクト: russlank/Prolog.NET
        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);
        }
コード例 #3
0
        public static void Rule(OptionalProcedureComments lhs, ProcedureComment procedureComment, OptionalProcedureComments optionalProcedureComments)
        {
            var comment = procedureComment.Text;

            Debug.Assert(comment.StartsWith("///"));

            comment = comment.Substring(3).Trim();

            lhs.Comments = new List<CodeComment> {new CodeComment(comment)};
            if (optionalProcedureComments.Comments != null)
            {
                lhs.Comments.AddRange(optionalProcedureComments.Comments);
            }
        }
コード例 #4
0
        public static void Rule(OptionalProcedureComments lhs, ProcedureComment procedureComment, OptionalProcedureComments optionalProcedureComments)
        {
            string comment = procedureComment.Text;

            Debug.Assert(comment.StartsWith("///"));

            comment = comment.Substring(3).Trim();

            lhs.Comments = new List <CodeComment>();
            lhs.Comments.Add(new CodeComment(comment));
            if (optionalProcedureComments.Comments != null)
            {
                lhs.Comments.AddRange(optionalProcedureComments.Comments);
            }
        }
コード例 #5
0
ファイル: Clause.cs プロジェクト: wallymathieu/Prolog.NET
        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);
        }
コード例 #6
0
ファイル: Clause.cs プロジェクト: russlank/Prolog.NET
        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);
        }
コード例 #7
0
 public static void Rule(OptionalProcedureComments lhs)
 { }
コード例 #8
0
 public static void Rule(OptionalProcedureComments lhs)
 {
 }