示例#1
0
            public static Instructions Parse(string[] input)
            {
                var instruction = new Instructions();

                foreach (var line in input)
                {
                    if (line.Contains('='))
                    {
                        instruction.Replacements.Add(Replacement.Parse(line));
                    }
                    else
                    {
                        instruction.Molecule = line;
                    }
                }

                return(instruction);
            }