Example #1
0
		public static StyleVariable ParseTree(ITree tree)
		{
			var name = tree.GetChild(0).Text;
			var variable = new StyleVariable {Name = name};
			switch(tree.GetChild(1).Text)
			{
				case "LITERAL":
					variable.Value = new LiteralExpression(tree.GetChild(1));
					break;
				default:
					variable.Value = StyleExpression.ParseExpression(tree.GetChild(1).GetChild(0));
					break;
			}
			return variable;
		}
Example #2
0
		public void AddVariable(StyleVariable variable)
		{
			Variables.Add(variable);
		}
Example #3
0
		private void AddVariable(StyleVariable variable)
		{
			Variables.Add(variable);
		}