Ejemplo n.º 1
0
		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;
		}
Ejemplo n.º 2
0
		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);
		}