public static StyleDocument FromString(string input) { var stream = new ANTLRStringStream(input); var lexer = new lesscssLexer(stream); var parser = new lesscssParser(new CommonTokenStream(lexer)); var root = parser.lessCss(); var doc = new StyleDocument(); doc.Load((BaseTree)root.Tree); return doc; }
public bool Equals(StyleDocument obj) { if (ReferenceEquals(null, obj)) return false; if (ReferenceEquals(this, obj)) return true; return obj.Variables.SequenceEqual(Variables) && obj.Rules.SequenceEqual(Rules); }