public override void VisitIdentifierExpression(IdentifierExpression identifierExpression)
        {
            base.VisitIdentifierExpression(identifierExpression);

            switch (identifierExpression.Identifier)
            {
                case "__cx":
                case "__cy":
                case "__cz":
                case "__cwidth":
                case "__cheight":
                case "__cdepth":
                    identifierExpression.ReplaceWith(this.m_CInitializers[identifierExpression.Identifier].Clone());
                    break;
            }
        }
            public override void VisitIdentifierExpression(IdentifierExpression identifierExpression)
            {
                if (this.m_Mappings.ContainsKey(identifierExpression.Identifier))
                {
                    identifierExpression.ReplaceWith(
                        new IdentifierExpression(
                            this.m_Mappings[identifierExpression.Identifier]));
                }

                base.VisitIdentifierExpression(identifierExpression);
            }
Beispiel #3
0
			public override void VisitIdentifierExpression (IdentifierExpression identifierExpression)
			{
				base.VisitIdentifierExpression (identifierExpression);

				Expression change;
				if (Subs.TryGetValue (identifierExpression.Identifier, out change)) {
					identifierExpression.ReplaceWith (change.Clone ());
				}
			}
Beispiel #4
0
        public void VisitIdentifierExpression(IdentifierExpression node)
        {
            VisitChildren(node);

            // Make member references explicit
            var result = resolver.Resolve(node) as MemberResolveResult;
            if (result != null && result.Member.SymbolKind == SymbolKind.Field) {
                if (((IField)result.Member).IsStatic) {
                    node.ReplaceWith(FullReference(result.Member));
                } else {
                    node.ReplaceWith(new MemberReferenceExpression(new ThisReferenceExpression(), node.Identifier));
                }
            }
        }