コード例 #1
0
ファイル: Compiler.cs プロジェクト: carriercomm/prolog
// ReSharper disable ParameterTypeCanBeEnumerable.Local
        private static Compiled.Goal [] Compile (AST.Goal [] goals, IDictionary <Tuple <string, int>, Compiled.Predicate> predicatesByName)
// ReSharper restore ParameterTypeCanBeEnumerable.Local
        {
            return goals.Select (g => new Compiled.Goal {Predicate = predicatesByName[Tuple.Create (g.PredicateName, g.Arguments.Length)], Arguments = g.Arguments}).ToArray ();
        }