public void ValueTest()
        {
            PrologCodeStringAtom prologCodeStringAtom = new PrologCodeStringAtom("Hello, World!");

            string result = prologCodeStringAtom.Value;

            Assert.AreEqual("Hello, World!", result);
        }
        public void ValueTest()
        {
            PrologCodeStringAtom prologCodeStringAtom = new PrologCodeStringAtom("Hello, World!");

            string result = prologCodeStringAtom.Value;

            Assert.AreEqual("Hello, World!", result);
        }
        private void ProcessHeadlessClause(PrologCodeTerm term)
        {
            PrologCodeHeadlessClause clause = (PrologCodeHeadlessClause)term;

            foreach (PrologCodeTerm t in clause.Goals)
            {
                if (t is PrologCodePredicate)
                {
                    PrologCodePredicate pred = (PrologCodePredicate)t;
                    switch (pred.Name)
                    {
                    case "op":
                        ProcessOperator(pred);
                        break;

                    case "class":
                        PrologCodeTerm arg = (PrologCodeTerm)pred.Arguments[0];
                        if (arg is PrologCodeConstantAtom)
                        {
                            PrologCodeConstantAtom atom = (PrologCodeConstantAtom)arg;
                            _codeUnit.Class = atom.Value;
                        }
                        else if (arg is PrologCodeStringAtom)
                        {
                            PrologCodeStringAtom atom = (PrologCodeStringAtom)arg;
                            _codeUnit.Class = atom.Value.Replace("'", "");
                        }
                        else
                        {
                            _errors.Add(new PrologCompilerError("P0002", "Illegal class name.", "", false, _scanner.Current.Line, _scanner.Current.Column));
                        }
                        break;

                    case "foreign":
                        ProcessForeignMethod(pred);
                        break;

                    case "load_assembly":
                        ProcessAssemblyDirective(pred);
                        break;

                    case "using":
                        ProcessUsingDirective(pred);
                        break;
                    }
                }
                else if (t is PrologCodeList)
                {
                }
            }
        }