コード例 #1
0
        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);
        }
コード例 #2
0
        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);
        }
コード例 #3
0
 public void SetName(string name)
 {
     LexTreeUtil.ReplaceChild(StateName, StateName.FirstChild, name);
 }
コード例 #4
0
 public void SetName(string name)
 {
     LexTreeUtil.ReplaceChild(TokenName, TokenName.FirstChild, name);
 }