private static UISList <UISObject> Elements() { var cm = Comments(); if (cm.Count > 0) { tempTree.Add(cm); } UISList <UISObject> currentList = new UISList <UISObject>(); while (true) { while (Test(Tag.LINE_END)) { Expect(Tag.LINE_END); } var item = Element(); if (item != null) { currentList.Add(item); } else { break; } } return(currentList); }
private static UISList <UISComment> Comments() { UISList <UISComment> currentList = new UISList <UISComment>(); while (Test(Tag.Comment)) { currentList.Add(Comment()); } return(currentList); }
private static UISList <UISAnimation> AniCollect() { UISList <UISAnimation> list = new UISList <UISAnimation>(); while (Expect(Tag.TAB)) { list.Add(Animation()); ExpectGrammar(Tag.LINE_END); } return(list); }
private static UISList <UISFunctionalElement> Cmds() { var cm = Comments(); if (cm.Count > 0) { tempTree.Add(cm); } UISList <UISFunctionalElement> currentList = new UISList <UISFunctionalElement>(); while (Test(Tag.AtProp)) { currentList.Add(Cmd()); } return(currentList); }
private static UISList <UISProperty> Props() { UISList <UISProperty> list = new UISList <UISProperty>(); while (Expect(Tag.TAB)) { var p = Prop(); if (p == null) { break; } list.Add(p); ExpectGrammar(Tag.LINE_END); } return(list); }
private static UISList <UISObject> Uis() { Move_line(); tempTree = new UISList <UISObject>(); var cm = Comments(); if (cm.Count > 0) { tempTree.Add(cm); } tempTree.Add(Cmds()); tempTree.Add(Elements()); return(tempTree); }
private static UISList <UISNumber> Indexs() { ExpectGrammar(Tag.LeftBar); UISList <UISNumber> lists = new UISList <UISNumber>(); do { lists.Add(Expr() as UISNumber); } while (Expect(Tag.Split)); //[2.1更新]: 支持_sprite-[1-3]形式的写法以简化多个元素同时定义的场景 if (Expect(Tag.Index)) { UISNumber end = Expr() as UISNumber; lists.AddAll(Enumerable .Range((int)lists.First().Number + 1, (int)end.Number) .Select(p => new UISNumber(p))); } ExpectGrammar(Tag.RightBar); return(lists); }