private static HeaderValueModel MatchValue(string text, HeaderModel parent, Scope scope) { var assignment = CSharp.ParseExpression(text) as AssignmentExpressionSyntax; if (assignment == null) { return(null); //td: error } parent.Values.Add(assignment); return(new HeaderValueModel()); }
private static HeaderModel MatchHeader(string text, RootModel parent, Scope scope) { if (text.StartsWith("[") && text.EndsWith("]")) { var header = new HeaderModel { Name = text }; parent.Headers.Add(header); return(header); } return(null); }