public virtual void Visit(Designator designator) { VisitSubNodes(designator); }
/// <summary> /// Set Designator tag /// </summary> /// <param name="tag">Tag to set</param> public void SetDesignator(Designator tag) { Tag = tag; }
/// <summary> /// Parser for Designator /// </summary> /// <returns>Parsed Designator</returns> public Designator ParseDesignator() { Designator tag = new Designator(); //Parse identifier of tag NextToken("identifier", "identifier"); tag.SetIdentifier(CurrentToken.GetValue().ToString()); while (TokenStream.HasNext()) { //Parse attributes if (TokenStream.Peek(1).GetType() == TokenType.SYMBOL && IsAttribute(TokenStream.Peek(1).GetValue().ToString())) { tag.AddAttribute(ParseAttribute()); } else { break; //No attributes left, so break } } return tag; }