/// <summary>
        /// Compiles the given snippet
        /// </summary>
        /// <param name="snip">The snippet</param>
        /// <param name="configuration">The configuration index (as in <c>Snip.Configurations</c>)</param>
        /// <param name="platform">The platform to compile to</param>
        /// <param name="location">The file location, used in error reporting</param>
        /// <returns>A new object containing all the relevant output</returns>
        public CompileResult CompileSnippet(Snip snip, int configuration, Platform platform, string location)
        {
            if (snip == null)
            {
                throw new ArgumentNullException("snip");
            }
            var config = snip.Configurations[configuration];

            return(CompileSnippet(snip.Text, location, config.Keywords, platform, config.Function));
        }
 /// <summary>
 /// Compiles the given snippet
 /// </summary>
 /// <param name="snip">The snippet</param>
 /// <param name="configuration">The configuration index (as in <c>Snip.Configurations</c>)</param>
 /// <param name="platform">The platform to compile to</param>
 /// <param name="location">The file location, used in error reporting</param>
 /// <returns>A new object containing all the relevant output</returns>
 public CompileResult CompileSnippet(Snip snip, int configuration, Platform platform, string location)
 {
     if (snip == null)
         throw new ArgumentNullException("snip");
     var config = snip.Configurations[configuration];
     return CompileSnippet(snip.Text, location, config.Keywords, platform, config.Function);
 }