Exemplo n.º 1
0
 public ScriptTypeExpr(AstNodeArgs args)
   : base(args)
 {
   if (ChildNodes.Count == 2 && ChildNodes[1].ChildNodes.Count == 0)
   {
     _identifier = ((TokenAst)ChildNodes[0]).Text;
   }
   else
     if (ChildNodes[0] is ScriptTypeExpr)
     {
       _typeExpr = ChildNodes[0] as ScriptTypeExpr;
       _identifier = ((TokenAst) ChildNodes[2].ChildNodes[0]).Text;
       _genericsPostfix = ChildNodes[2].ChildNodes[1] as ScriptGenericsPostfix;
     }
     else
     {
       _genericsPostfix = (ScriptGenericsPostfix)ChildNodes[1];
       _identifier = _genericsPostfix.GetGenericTypeName(((TokenAst)ChildNodes[0]).Text);
     }
 }
Exemplo n.º 2
0
 public ScriptTypeExpr(AstNodeArgs args)
     : base(args)
 {
     if (ChildNodes.Count == 2 && ChildNodes[1].ChildNodes.Count == 0)
     {
         _identifier = ((TokenAst)ChildNodes[0]).Text;
     }
     else
     if (ChildNodes[0] is ScriptTypeExpr)
     {
         _typeExpr        = ChildNodes[0] as ScriptTypeExpr;
         _identifier      = ((TokenAst)ChildNodes[2].ChildNodes[0]).Text;
         _genericsPostfix = ChildNodes[2].ChildNodes[1] as ScriptGenericsPostfix;
     }
     else
     {
         _genericsPostfix = (ScriptGenericsPostfix)ChildNodes[1];
         _identifier      = _genericsPostfix.GetGenericTypeName(((TokenAst)ChildNodes[0]).Text);
     }
 }
Exemplo n.º 3
0
 public ScriptTypeConstructor(AstNodeArgs args)
     : base(args)
 {
     _typeExpr = ChildNodes[0] as ScriptTypeExpr;
     _callExpr = ChildNodes[1] as ScriptFunctionCall;
 }
Exemplo n.º 4
0
 public ScriptNewArrStmt(AstNodeArgs args)
   : base(args)
 {
   _constrExpr = ChildNodes[1] as ScriptTypeExpr;
   _arrRank = ChildNodes[2] as ScriptArrayResolution;
 }
Exemplo n.º 5
0
 private static string EvaluateName(ScriptTypeExpr expr)
 {
   return expr._typeExpr != null ? EvaluateName(expr._typeExpr) + "." + expr._identifier : expr._identifier;
 }
Exemplo n.º 6
0
 public ScriptNewArrStmt(AstNodeArgs args)
     : base(args)
 {
     _constrExpr = ChildNodes[1] as ScriptTypeExpr;
     _arrRank    = ChildNodes[2] as ScriptArrayResolution;
 }
Exemplo n.º 7
0
 public ScriptTypeConstructor(AstNodeArgs args)
     : base(args)
 {
   _typeExpr = ChildNodes[0] as ScriptTypeExpr;
   _callExpr = ChildNodes[1] as ScriptFunctionCall;
 }
Exemplo n.º 8
0
 private static string EvaluateName(ScriptTypeExpr expr)
 {
     return(expr._typeExpr != null?EvaluateName(expr._typeExpr) + "." + expr._identifier : expr._identifier);
 }