Exemple #1
0
 public virtual void Visit(TypeExp node)
 {
     AssignIsPartOfIteratorBody(node);
     this.SubexpressionTranslations.AddTrivialTranslation(node, string.Empty);
     // TODO: PSM2XPath: there should be some suport for types in the future
     //throw new ExpressionNotSupportedInXPath(node);
 }
Exemple #2
0
 public override OclExpression Visit(TypeExp node)
 {
     /* Types we can't handle yet */
     isSuitable             = false;
     notSupportedExpression = node;
     throw new OclConstructNotAvailableInPSM(node);
 }
 public override bool Visit(TypeExp node)
 {
     /* Types we can't handle yet */
     isSuitable          = false;
     violatingExpression = node;
     return(false);
 }
Exemple #4
0
        public override string ToString()
        {
            StringBuilder buf = new StringBuilder();

            buf.Append(TypeExp != null ? TypeExp.ToString() : "");
            buf.Append(ArgExp != null ? ArgExp.ToString() : "");
            return(buf.ToString());
        }
Exemple #5
0
        Exp analyType(AnalyExpContext context)
        {
            IGcl gcl = context.StmtContext.MethodContext.ClassContext.SearchType(IdentName);

            if (gcl != null)
            {
                Type    type = gcl.ForType;
                TypeExp exp  = new TypeExp(this, IdentToken, type);
                return(exp);
            }
            return(null);
        }
Exemple #6
0
        Exp analyCurrentClass(AnalyExpContext context)
        {
            var IdentSymbol = symbols.Get(IdentName);

            if (IdentSymbol == null)
            {
                return(null);
            }
            if (IdentSymbol is InstanceSymbol)
            {
                VarExp exp = new VarExp(this, IdentToken, this.IsAssignedBy, this.IsAssignedValue);
                return(exp);
            }
            else if (IdentSymbol is SymbolDefClass)
            {
                TypeExp exp = new TypeExp(this, IdentToken, (IdentSymbol as SymbolDefClass));
                return(exp);
            }
            else
            {
                throw new CompileException("类型非IVarSymbol、SymbolDefClass");
            }
        }
Exemple #7
0
 public override void SetParent(Exp parentExp)
 {
     ParentExp = parentExp;
     TypeExp.SetParent(this);
     BracketExp.SetParent(this);
 }
Exemple #8
0
 public override string ToString()
 {
     return(TypeExp.ToString() + BracketExp.ToString());
 }
Exemple #9
0
 public void Visit(TypeExp node)
 {
 }
Exemple #10
0
 public void Visit(TypeExp node)
 {
     sb.Append(node.ReferredType.Name);
 }
Exemple #11
0
 public void Visit(TypeExp node)
 {
     throw new NotImplementedException();
 }
Exemple #12
0
 public abstract TType Visit(TypeExp node);
Exemple #13
0
 public override string ToString()
 {
     return(TypeExp.ToString() + ArgExp.ToString());
 }