Parse() public static method

Creates a WordNode by parsing the given string representation.
public static Parse ( string source ) : WordNode
source string The string to parse the WordNode from.
return WordNode
        /// <summary>
        /// Creates a PhraseNode by parsing the given string representation.
        /// </summary>
        /// <param name="source">The string to parse the PhraseNode from.</param>
        /// <returns>A new PhraseNode.</returns>
        public static PhraseNode Parse(string source)
        {
            if (source == null)
            {
                throw new ArgumentNullException("source");
            }

            var words = source.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);
            var pn    = new PhraseNode();

            foreach (var word in words)
            {
                pn.Words.Add(WordNode.Parse(word));
            }
            return(pn);
        }