private KeyValuePair <string, string> ParseFieldOrHeredoc() { const string nullLiteral = "~"; string line = _lex.Current.Trim(); Match heredoc = HEREDOC.Match(line); if (heredoc.Success) { return(ParseHeredoc(heredoc)); } string[] kvp = line.Split(new[] { ':' }, 2); if (kvp.Length != 2) { throw SpecFailure.FixtureParserMissingFieldSeparator(_lex.Line); } var value = kvp[1].Trim(); if (value == nullLiteral) { value = null; } return(new KeyValuePair <string, string>(kvp[0].Trim(), value)); }