public void CompileStaticPropertyRef(StaticPropertyRef staticRef) { XmlElement tmpElement = document.CreateElement("StaticPropertyRef"); tmpElement.SetAttribute("Name", staticRef.Name.ToString()); currentElement.AppendChild(tmpElement); }
/// <summary> /// Recognizes expressions that start with a type's name. /// </summary> /// <returns> /// A <see cref="StaticMethodCall"/> or a <see cref="StaticPropertyRef"/> /// </returns> protected Expression AtomStartingWithTypeName() { Expression expr; Token first = Match(TokenID.TypeName); Match(TokenID.DoubleColon); Token last = Match(TokenID.Identifier); var name = new QualifiedName(first.ToString(), last.ToString()); if (TryMatch(TokenID.LeftParenthesis)) { Consume(1); Expression[] args = List <Expression>(Expression, false, null); last = Match(TokenID.RightParenthesis); expr = new StaticMethodCall(name, args); } else { expr = new StaticPropertyRef(name); } expr.SetLocation(first.Start, last.End); return(expr); }
public void CompileStaticPropertyRef(StaticPropertyRef staticRef) { textWriter.Write(SafeName(staticRef.Name)); }