adding #pragma warnings to yprolog language support
parent
05fb40dc0b
commit
ae0bcab35e
|
@ -115,7 +115,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog
|
|||
|
||||
// disable warning on l1, don't see how we can
|
||||
// code this differently
|
||||
#pragma warning disable 0168
|
||||
#pragma warning disable 0168, 0219
|
||||
|
||||
/// <summary>
|
||||
/// For each result, unify the _freeVariables and unify bagArrayVariable with the associated bag.
|
||||
|
@ -208,7 +208,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog
|
|||
bagOfAnswers.add();
|
||||
return bagOfAnswers.resultSet(Bag);
|
||||
}
|
||||
#pragma warning restore 0168
|
||||
#pragma warning restore 0168, 0219
|
||||
|
||||
/// <summary>
|
||||
/// A TermArrayEqualityComparer implements IEqualityComparer to compare two object arrays using YP.termEqual.
|
||||
|
|
|
@ -73,7 +73,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog
|
|||
|
||||
// disable warning on l1, don't see how we can
|
||||
// code this differently
|
||||
#pragma warning disable 0168
|
||||
#pragma warning disable 0168, 0219
|
||||
|
||||
/// <summary>
|
||||
/// This is a simplified findall when the goal is a single call.
|
||||
|
@ -103,6 +103,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog
|
|||
findallAnswers.add();
|
||||
return findallAnswers.resultArray();
|
||||
}
|
||||
#pragma warning restore 0168
|
||||
#pragma warning restore 0168, 0219
|
||||
}
|
||||
}
|
||||
|
|
|
@ -51,7 +51,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog
|
|||
|
||||
// disable warning on l1, don't see how we can
|
||||
// code this differently
|
||||
#pragma warning disable 0168
|
||||
#pragma warning disable 0168, 0219
|
||||
/// <summary>
|
||||
/// If arg is another Functor1, then succeed (yield once) if this and arg have the
|
||||
/// same name and the functor args unify, otherwise fail (don't yield).
|
||||
|
@ -78,7 +78,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog
|
|||
yield return false;
|
||||
}
|
||||
}
|
||||
#pragma warning restore 0168
|
||||
#pragma warning restore 0168, 0219
|
||||
|
||||
|
||||
public override string ToString()
|
||||
|
|
|
@ -53,7 +53,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog
|
|||
|
||||
// disable warning on l1, don't see how we can
|
||||
// code this differently
|
||||
#pragma warning disable 0168
|
||||
#pragma warning disable 0168, 0219
|
||||
/// If arg is another Functor2, then succeed (yield once) if this and arg have the
|
||||
/// same name and all functor args unify, otherwise fail (don't yield).
|
||||
/// If arg is a Variable, then call its unify to unify with this.
|
||||
|
@ -79,7 +79,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog
|
|||
yield return false;
|
||||
}
|
||||
}
|
||||
#pragma warning restore 0168
|
||||
#pragma warning restore 0168, 0219
|
||||
|
||||
|
||||
public override string ToString()
|
||||
|
|
|
@ -55,7 +55,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog
|
|||
|
||||
// disable warning on l1, don't see how we can
|
||||
// code this differently
|
||||
#pragma warning disable 0168
|
||||
#pragma warning disable 0168, 0219
|
||||
/// If arg is another Functor3, then succeed (yield once) if this and arg have the
|
||||
/// same name and all functor args unify, otherwise fail (don't yield).
|
||||
/// If arg is a Variable, then call its unify to unify with this.
|
||||
|
@ -84,7 +84,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog
|
|||
yield return false;
|
||||
}
|
||||
}
|
||||
#pragma warning restore 0168
|
||||
#pragma warning restore 0168, 0219
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
|
|
|
@ -249,7 +249,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog
|
|||
object[] arguments = YP.getFunctorArgs(Head);
|
||||
|
||||
// We always match Head from _allAnswers, and the Body is Atom.a("true").
|
||||
#pragma warning disable 0168
|
||||
#pragma warning disable 0168, 0219
|
||||
foreach (bool l1 in YP.unify(Body, Atom.a("true")))
|
||||
{
|
||||
// The caller can assert another answer into this same predicate during yield, so we have to
|
||||
|
@ -260,7 +260,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog
|
|||
yield return false;
|
||||
}
|
||||
}
|
||||
#pragma warning restore 0168
|
||||
#pragma warning restore 0168, 0219
|
||||
}
|
||||
|
||||
public IEnumerable<bool> retract(object Head, object Body)
|
||||
|
@ -271,7 +271,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog
|
|||
object[] arguments = YP.getFunctorArgs(Head);
|
||||
|
||||
// We always match Head from _allAnswers, and the Body is Atom.a("true").
|
||||
#pragma warning disable 0168
|
||||
#pragma warning disable 0168, 0219
|
||||
foreach (bool l1 in YP.unify(Body, Atom.a("true")))
|
||||
{
|
||||
// The caller can assert another answer into this same predicate during yield, so we have to
|
||||
|
@ -286,7 +286,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog
|
|||
}
|
||||
}
|
||||
}
|
||||
#pragma warning restore 0168
|
||||
#pragma warning restore 0168, 0219
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -116,10 +116,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog
|
|||
{
|
||||
// disable warning on l1, don't see how we can
|
||||
// code this differently
|
||||
#pragma warning disable 0168
|
||||
#pragma warning disable 0168, 0219
|
||||
foreach (bool l1 in YP.unify(this, arg))
|
||||
yield return false;
|
||||
#pragma warning restore 0168
|
||||
#pragma warning restore 0168, 0219
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -623,7 +623,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog
|
|||
|
||||
// disable warning on l1, don't see how we can
|
||||
// code this differently
|
||||
#pragma warning disable 0168
|
||||
#pragma warning disable 0168, 0219
|
||||
public static IEnumerable<bool> univ(object Term, object List)
|
||||
{
|
||||
Term = YP.getValue(Term);
|
||||
|
@ -704,10 +704,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog
|
|||
object[] args = new object[(int)Arity];
|
||||
for (int i = 0; i < args.Length; ++i)
|
||||
args[i] = new Variable();
|
||||
#pragma warning disable 0219
|
||||
foreach (bool l1 in YP.unify(Term, Functor.make((Atom)FunctorName, args)))
|
||||
yield return false;
|
||||
#pragma warning restore 0219
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -2632,7 +2630,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog
|
|||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
#pragma warning restore 0168
|
||||
#pragma warning restore 0168, 0219
|
||||
/// <summary>
|
||||
/// A ClauseHeadAndBody is used in Compiler.compileAnonymousFunction as a base class
|
||||
/// in order to implement YP.IClause. After creating the object, you must call setHeadAndBody.
|
||||
|
@ -2653,13 +2651,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog
|
|||
if (_Head == null || _Body == null)
|
||||
yield break;
|
||||
|
||||
#pragma warning disable 0168
|
||||
#pragma warning disable 0168, 0219
|
||||
foreach (bool l1 in YP.unify(Head, _Head))
|
||||
{
|
||||
foreach (bool l2 in YP.unify(Body, _Body))
|
||||
yield return false;
|
||||
}
|
||||
#pragma warning restore 0168
|
||||
#pragma warning restore 0168, 0219
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -203,7 +203,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog
|
|||
|
||||
// disable warning on l1, don't see how we can
|
||||
// code this differently
|
||||
#pragma warning disable 0168,0164,0162
|
||||
#pragma warning disable 0168, 0164, 0162, 0219
|
||||
public static bool isDetNoneOut(object State, object Term)
|
||||
{
|
||||
State = YP.getValue(State);
|
||||
|
@ -241,7 +241,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog
|
|||
|
||||
return false;
|
||||
}
|
||||
#pragma warning restore 0168,0164,0162
|
||||
#pragma warning restore 0168, 0164, 0162, 0219
|
||||
|
||||
/// <summary>
|
||||
/// Return false if any of args is out, otherwise true.
|
||||
|
|
Loading…
Reference in New Issue