public override IReference BindTo(IDeclaredElement element) { var stateName = GetTreeNode() as StateName; if (stateName.Parent != null) { LexTreeUtil.ReplaceChild(stateName, stateName.FirstChild, element.ShortName); stateName.SetName(element.ShortName); } return(this); }
public override IReference BindTo(IDeclaredElement element) { var tokenTypeName = (ITokenTypeName)GetTreeNode(); if (tokenTypeName.Parent != null) { LexTreeUtil.ReplaceChild(tokenTypeName, tokenTypeName.FirstChild, element.ShortName); tokenTypeName.SetName(element.ShortName); } return(this); }
public void SetName(string name) { LexTreeUtil.ReplaceChild(StateName, StateName.FirstChild, name); }
public void SetName(string name) { LexTreeUtil.ReplaceChild(TokenName, TokenName.FirstChild, name); }