Esempio n. 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;
		}
Esempio n. 2
0
		public void AddVariable(StyleVariable variable)
		{
			Variables.Add(variable);
		}
Esempio n. 3
0
		private void AddVariable(StyleVariable variable)
		{
			Variables.Add(variable);
		}