Ejemplo n.º 1
0
        public ScriptTypeConvertExpr(AstNodeArgs args)
            : base(args)
        {
            if (ChildNodes.Count == 2)
            {
                if (args.ChildNodes[0] is ScriptExpr &&
                    !(args.ChildNodes[1] is ScriptExpr))
                {
                    // ( Expr )
                    _expr     = args.ChildNodes[0] as ScriptExpr;
                    _typeExpr = null;
                }
                else
                {
                    //(Type) Expr
                    _typeExpr = args.ChildNodes[0] as ScriptExpr;
                    _expr     = args.ChildNodes[1] as ScriptExpr;
                }
            }
            else
            {
                throw new ScriptSyntaxErrorException(Strings.GrammarErrorExceptionMessage);
            }

            _operator = RuntimeHost.GetBinaryOperator("+");
            if (_operator == null)
            {
                throw new ScriptRuntimeException(string.Format(Strings.MissingOperatorError, "+"));
            }
        }
Ejemplo n.º 2
0
 public ScriptFuncContract(AstNodeArgs args)
     : base(args)
 {
     _pre  = ChildNodes[0] as ScriptFuncContractPre;
     _post = ChildNodes[1] as ScriptFuncContractPost;
     _inv  = ChildNodes[2] as ScriptFuncContractInv;
 }
Ejemplo n.º 3
0
 public ScriptFuncContract(AstNodeArgs args)
     : base(args)
 {
   _pre = ChildNodes[0] as ScriptFuncContractPre;
   _post = ChildNodes[1] as ScriptFuncContractPost;
   _inv = ChildNodes[2] as ScriptFuncContractInv;
 }
Ejemplo n.º 4
0
 public ScriptForEachStatement(AstNodeArgs args)
     : base(args)
 {
     _name      = (TokenAst)ChildNodes[1];
     _expr      = (ScriptExpr)ChildNodes[3];
     _statement = (ScriptStatement)ChildNodes[4];
 }
Ejemplo n.º 5
0
        public ScriptQualifiedName(AstNodeArgs args)
            : base(args)
        {
            IsVariable = false;
            NextFirst  = false;
            IsVar      = false;

            if (ChildNodes.Count == 2 && ChildNodes[1].ChildNodes.Count == 0)
            {
                _identifier = ExtractId(((TokenAst)ChildNodes[0]).Text);
                IsVariable  = true;

                _evaluation = EvaluateIdentifier;
                _assignment = AssignIdentifier;
            }
            else
            if (ChildNodes[0] is TokenAst && ChildNodes[1].ChildNodes.Count != 0)
            {
                _identifier = ExtractId(((TokenAst)ChildNodes[0]).Text);

                //NOTE: There might be two cases:
                //      1) a()[]...()
                //      2) a<>.(NamePart)
                _modifiers = new List <ScriptAst>();
                foreach (ScriptAst node in ChildNodes[1].ChildNodes)
                {
                    _modifiers.Add(node);
                }

                var generic = _modifiers.FirstOrDefault() as ScriptGenericsPostfix;
                if (generic != null && _modifiers.Count == 1)
                {
                    //Case 2
                    _evaluation = EvaluateGenericType;
                    _assignment = null;
                }
                else
                {
                    //Case 1
                    _evaluation = EvaluateFunctionCall;
                    _assignment = AssignArray;
                }
            }
            else
            {
                _namePart   = ChildNodes[0] as ScriptQualifiedName;
                _identifier = ExtractId(((TokenAst)ChildNodes[2]).Text);
                NextFirst   = true;
                if (ChildNodes.Count == 4 && ChildNodes[3].ChildNodes.Count != 0)
                {
                    _modifiers = new List <ScriptAst>();
                    foreach (ScriptAst node in ChildNodes[3].ChildNodes)
                    {
                        _modifiers.Add(node);
                    }
                }
                _evaluation = EvaluateNamePart;
                _assignment = AssignNamePart;
            }
        }
Ejemplo n.º 6
0
 public ScriptForEachStatement(AstNodeArgs args)
   : base(args)
 {
   _name = (TokenAst)ChildNodes[1];
   _expr = (ScriptExpr)ChildNodes[3];
   _statement = (ScriptStatement)ChildNodes[4];
 }
Ejemplo n.º 7
0
    public ScriptTypeConvertExpr(AstNodeArgs args)
        : base(args)
    {
      if (ChildNodes.Count == 2)
      {
        if (args.ChildNodes[0] is ScriptExpr &&
            !(args.ChildNodes[1] is ScriptExpr))
        {
          // ( Expr )
          _expr = args.ChildNodes[0] as ScriptExpr;
          _typeExpr = null;
        }
        else
        {
          //(Type) Expr
          _typeExpr = args.ChildNodes[0] as ScriptExpr;
          _expr = args.ChildNodes[1] as ScriptExpr;         
        }
      }
      else
      {
        throw new ScriptSyntaxErrorException(Strings.GrammarErrorExceptionMessage);
      }

      _operator = RuntimeHost.GetBinaryOperator("+");
      if (_operator == null)
        throw new ScriptRuntimeException(string.Format(Strings.MissingOperatorError, "+"));
    }
Ejemplo n.º 8
0
 public ScriptArrayResolution(AstNodeArgs args)
     : base(args)
 {
     if (args.ChildNodes.Count != 0)
     {
         _args = args.ChildNodes[0] as ScriptExprList;
     }
 }
Ejemplo n.º 9
0
 public ScriptTryCatchFinallyStatement(AstNodeArgs args)
     : base(args)
 {
     _tryBlock     = ChildNodes[1] as ScriptStatement;
     _expName      = ((TokenAst)ChildNodes[3]).Text;
     _catchBlock   = ChildNodes[4] as ScriptStatement;
     _finallyBlock = ChildNodes[6] as ScriptStatement;
 }
 public ScriptTryCatchFinallyStatement(AstNodeArgs args)
     : base(args)
 {
   _tryBlock = ChildNodes[1] as ScriptStatement;
   _expName = ((TokenAst) ChildNodes[3]).Text;
   _catchBlock = ChildNodes[4] as ScriptStatement;
   _finallyBlock = ChildNodes[6] as ScriptStatement;
 }
Ejemplo n.º 11
0
 public ScriptFunctionCall(AstNodeArgs args)
     : base(args)
 {
     if (ChildNodes.Count != 0)
     {
         _funcArgs = ChildNodes[0] as ScriptExprList;
     }
 }
Ejemplo n.º 12
0
    public ScriptIsExpr(AstNodeArgs args)
      : base(args)
    {
      Debug.Assert(Oper == "is");

      _operator = RuntimeHost.GetBinaryOperator(Oper);
      if (_operator == null)
        throw new ScriptRuntimeException(string.Format(Strings.MissingOperatorError, "is"));
    }
    public ScriptFlowControlStatement(AstNodeArgs args)
        : base(args)
    {
      var oper = ChildNodes[0] as TokenAst;
      _operation = oper.Text;
      Debug.Assert(oper.Text == "return" || oper.Text == "break" || oper.Text == "continue" || oper.Text == "throw");

      if (_operation == "return" || _operation == "throw")
        _expression = (ScriptExpr)ChildNodes[1];
    }
Ejemplo n.º 14
0
    public ScriptConstExpr(AstNodeArgs args)
        : base(args)
    {
      var cons = (TokenAst)ChildNodes[0];
      Value = cons.Value;

      if (Value.Equals("true")) Value = true;
      if (Value.Equals("false")) Value = false;
      if (Value.Equals("null")) Value = null;
    }
Ejemplo n.º 15
0
    public ScriptFuncParameters(AstNodeArgs args)
      : base(args)
    {
      if (ChildNodes.Count != 1) return;

      foreach (var astNode in ChildNodes[0].ChildNodes)
      {
        Identifiers.Add(((TokenAst) astNode).Text);
      }
    }
Ejemplo n.º 16
0
 public ScriptIfStatement(AstNodeArgs args)
     : base(args)
 {
     _condition = (ScriptCondition)ChildNodes[1];
     _statement = (ScriptStatement)ChildNodes[2];
     //Else exists
     if (ChildNodes.Count == 4 && ChildNodes[3].ChildNodes.Count == 2 && ChildNodes[3].ChildNodes[1] is ScriptStatement)
     {
         _elseStatement = (ScriptStatement)ChildNodes[3].ChildNodes[1];
     }
 }
Ejemplo n.º 17
0
 public ScriptIfStatement(AstNodeArgs args)
     : base(args)
 {
   _condition = (ScriptCondition) ChildNodes[1];
   _statement = (ScriptStatement)ChildNodes[2];
   //Else exists
   if (ChildNodes.Count == 4 && ChildNodes[3].ChildNodes.Count == 2 && ChildNodes[3].ChildNodes[1] is ScriptStatement)
   {
     _elseStatement = (ScriptStatement)ChildNodes[3].ChildNodes[1];
   }
 }
Ejemplo n.º 18
0
        public ScriptIsExpr(AstNodeArgs args)
            : base(args)
        {
            Debug.Assert(Oper == "is");

            _operator = RuntimeHost.GetBinaryOperator(Oper);
            if (_operator == null)
            {
                throw new ScriptRuntimeException(string.Format(Strings.MissingOperatorError, "is"));
            }
        }
Ejemplo n.º 19
0
 public ScriptSwitchStatement(AstNodeArgs args)
     : base(args)
 {
   _cases = new List<ScriptSwitchCaseStatement>();
   foreach (ScriptSwitchCaseStatement caseStatement in ChildNodes[0].ChildNodes)
   {
     _cases.Add(caseStatement);
   }
   if (ChildNodes.Count == 2)
     _defaultCase = ChildNodes[1] as ScriptSwitchDefaultStatement;
 }
Ejemplo n.º 20
0
        public ScriptMetaExpr(AstNodeArgs args)
            : base(args)
        {
            var progArgs = new AstNodeArgs
              {
            ChildNodes = new AstNodeList { ChildNodes[1] },
            Span = args.Span,
            Term = args.Term
              };

              _metaProg = new ScriptProg(progArgs) { Parent = this };
        }
Ejemplo n.º 21
0
    public ScriptForStatement(AstNodeArgs args)
        : base(args)
    {
      _init = (ScriptExpr)args.ChildNodes[1];
      _cond = (ScriptExpr)args.ChildNodes[2];
      _next = (ScriptExpr)args.ChildNodes[3];
      _statement = (ScriptStatement)args.ChildNodes[4];

      var body = _statement as ScriptCompoundStatement;
      if (body != null)
        body.ShouldCreateScope = false;
    }
Ejemplo n.º 22
0
        public ScriptFlowControlStatement(AstNodeArgs args)
            : base(args)
        {
            var oper = ChildNodes[0] as TokenAst;

            _operation = oper.Text;
            Debug.Assert(oper.Text == "return" || oper.Text == "break" || oper.Text == "continue" || oper.Text == "throw");

            if (_operation == "return" || _operation == "throw")
            {
                _expression = (ScriptExpr)ChildNodes[1];
            }
        }
Ejemplo n.º 23
0
 public ScriptSwitchStatement(AstNodeArgs args)
     : base(args)
 {
     _cases = new List <ScriptSwitchCaseStatement>();
     foreach (ScriptSwitchCaseStatement caseStatement in ChildNodes[0].ChildNodes)
     {
         _cases.Add(caseStatement);
     }
     if (ChildNodes.Count == 2)
     {
         _defaultCase = ChildNodes[1] as ScriptSwitchDefaultStatement;
     }
 }
Ejemplo n.º 24
0
        public ScriptFuncParameters(AstNodeArgs args)
            : base(args)
        {
            if (ChildNodes.Count != 1)
            {
                return;
            }

            foreach (var astNode in ChildNodes[0].ChildNodes)
            {
                Identifiers.Add(((TokenAst)astNode).Text);
            }
        }
Ejemplo n.º 25
0
    public ScriptConstExpr(AstNodeArgs args)
        : base(args)
    {
      TokenAst constant = (TokenAst)ChildNodes[0];
      Value = constant.Value;

      if (constant.IsKeyword)
      {
        if (Value.Equals("true")) Value = true;
        else if (Value.Equals("false")) Value = false;
        else if (Value.Equals("null")) Value = null;
      }
    }
Ejemplo n.º 26
0
    public ScriptAssignExpr(AstNodeArgs args)
        : base(args)
    {
      var varExpr = args.ChildNodes[0] as ScriptVarExpr;
      if (varExpr != null)
      {
        var id = varExpr.ChildNodes[1] as TokenAst;
        _nameExpr = new ScriptQualifiedName(new AstNodeArgs(args.Term, args.Span,
           new AstNodeList { id, new AstNode(new AstNodeArgs(args.Term, new SourceSpan(new SourceLocation(0, 0, 0), 0), new AstNodeList())) })) { IsVar = true };
      }
      else
      {
        _nameExpr = (ScriptQualifiedName)args.ChildNodes[0];
      }

      _oper = ((TokenAst)args.ChildNodes[1]).Text;
      if (args.ChildNodes.Count == 3)
        _rightExpr = (ScriptExpr)args.ChildNodes[2];

      Debug.Assert(_oper == "=" || _oper == ":=" || _oper == "+=" || _oper == "-=" || _oper == "++" || _oper == "--" || _oper == ":=");
            
      switch (_oper)
      {
        case "=":
          _assignOperation = Assign;
          break;
        case ":=":
          _assignOperation = AssignEx;
          break;
        case "++":
          _assignOperation = PlusPlus;
          break;
        case "--":
          _assignOperation = MinusMinus;
          break;
        case "+=":
          _assignOperation = PlusEqual;
          break;
        case "-=":
          _assignOperation = MinusEqual;
          break;
        default:
          throw new System.InvalidOperationException(string.Format(Strings.AssignmentOperatorNotSupported, _oper));
      }

      _minus = RuntimeHost.GetBinaryOperator(OperatorCodes.Sub);
      _plus = RuntimeHost.GetBinaryOperator(OperatorCodes.Add);

      if (_plus == null || _minus == null)
        throw new ScriptRuntimeException(string.Format(Strings.MissingOperatorError, "+,-"));
    }
Ejemplo n.º 27
0
 public ScriptUnaryExpr(AstNodeArgs args)
     : base(args)
 {
   if (ChildNodes[0] is ScriptExpr)
   { 
     _expr = (ScriptExpr)ChildNodes[0];
     OperationSymbol = ((TokenAst)ChildNodes[1]).Text;
   }
   else
   {
     _expr = (ScriptExpr)ChildNodes[1];
     OperationSymbol = ((TokenAst)ChildNodes[0]).Text;
   }
 }
Ejemplo n.º 28
0
 public ScriptUnaryExpr(AstNodeArgs args)
     : base(args)
 {
     if (ChildNodes[0] is ScriptExpr)
     {
         _expr           = (ScriptExpr)ChildNodes[0];
         OperationSymbol = ((TokenAst)ChildNodes[1]).Text;
     }
     else
     {
         _expr           = (ScriptExpr)ChildNodes[1];
         OperationSymbol = ((TokenAst)ChildNodes[0]).Text;
     }
 }
Ejemplo n.º 29
0
        public ScriptForStatement(AstNodeArgs args)
            : base(args)
        {
            _init      = (ScriptExpr)args.ChildNodes[1];
            _cond      = (ScriptExpr)args.ChildNodes[2];
            _next      = (ScriptExpr)args.ChildNodes[3];
            _statement = (ScriptStatement)args.ChildNodes[4];

            var body = _statement as ScriptCompoundStatement;

            if (body != null)
            {
                body.ShouldCreateScope = false;
            }
        }
Ejemplo n.º 30
0
        public ScriptMetaExpr(AstNodeArgs args)
            : base(args)
        {
            var progArgs = new AstNodeArgs
            {
                ChildNodes = new AstNodeList {
                    ChildNodes[1]
                },
                Span = args.Span,
                Term = args.Term
            };

            _metaProg = new ScriptProg(progArgs)
            {
                Parent = this
            };
        }
Ejemplo n.º 31
0
    public ScriptBinExpr(AstNodeArgs args)
        : base(args)
    {
      left = (ScriptExpr)ChildNodes[0];
      Oper = ((TokenAst)ChildNodes[1]).Text;
      right = (ScriptExpr)ChildNodes[2];
      
      Value = RuntimeHost.NullValue;
      if (IsConst)
          Evaluation = ConstFirstEvaluate;
      else
          Evaluation = CompleteEvaluate;

      OperatorFunction = RuntimeHost.GetBinaryOperator(Oper);
      if (OperatorFunction == null)
        throw new ScriptRuntimeException(string.Format(Strings.MissingOperatorError, Oper));
    }
Ejemplo n.º 32
0
        public ScriptMObject(AstNodeArgs args)
            : base(args)
        {
            _objectParts = new List <ScriptMObjectPart>();

            if (ChildNodes[0] is ScriptMObjectPart)
            {
                var part = (ScriptMObjectPart)ChildNodes[0];
                _objectParts.Add(part);
            }
            else
            {
                foreach (ScriptMObjectPart part in ChildNodes[0].ChildNodes)
                {
                    _objectParts.Add(part);
                }
            }
        }
Ejemplo n.º 33
0
    public ScriptMObject(AstNodeArgs args)
      : base(args)
    {
      _objectParts = new List<ScriptMObjectPart>();

      if (ChildNodes[0] is ScriptMObjectPart)
      {
        var part = (ScriptMObjectPart)ChildNodes[0];
        _objectParts.Add(part);
      }
      else
      {
        foreach (ScriptMObjectPart part in ChildNodes[0].ChildNodes)
        {
          _objectParts.Add(part);
        }
      }
    }
Ejemplo n.º 34
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);
     }
 }
Ejemplo n.º 35
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);
     }
 }
Ejemplo n.º 36
0
        public ScriptConstExpr(AstNodeArgs args)
            : base(args)
        {
            var cons = (TokenAst)ChildNodes[0];

            Value = cons.Value;

            if (Value.Equals("true"))
            {
                Value = true;
            }
            if (Value.Equals("false"))
            {
                Value = false;
            }
            if (Value.Equals("null"))
            {
                Value = null;
            }
        }
Ejemplo n.º 37
0
        public ScriptFunctionDefinition(AstNodeArgs args)
            : base(args)
        {
            var funcName = ChildNodes[1] as TokenAst;
            var index    = 0;

            if (funcName != null)
            {
                Name = funcName.Text;
            }
            else
            //Function expression
            {
                Name  = null;
                index = 1;
            }

            if (ChildNodes.Count == 5 - index)
            {
                _contract   = ChildNodes[3 - index] as ScriptFuncContract;
                _parameters = ChildNodes[3 - index] as ScriptFuncParameters;
            }

            if (ChildNodes.Count == 6 - index)
            {
                _parameters = ChildNodes[2 - index] as ScriptFuncParameters;
                _globalList = ChildNodes[3 - index] as ScriptGlobalList;
                _contract   = ChildNodes[4 - index] as ScriptFuncContract;
            }

            _body = (ScriptCompoundStatement)ChildNodes[ChildNodes.Count - 1];
            _body.ShouldCreateScope = false;

            if (_contract != null)
            {
                _contract._function = this;
            }
        }
Ejemplo n.º 38
0
        public ScriptBinExpr(AstNodeArgs args)
            : base(args)
        {
            left  = (ScriptExpr)ChildNodes[0];
            Oper  = ((TokenAst)ChildNodes[1]).Text;
            right = (ScriptExpr)ChildNodes[2];

            Value = RuntimeHost.NullValue;
            if (IsConst)
            {
                Evaluation = ConstFirstEvaluate;
            }
            else
            {
                Evaluation = CompleteEvaluate;
            }

            OperatorFunction = RuntimeHost.GetBinaryOperator(Oper);
            if (OperatorFunction == null)
            {
                throw new ScriptRuntimeException(string.Format(Strings.MissingOperatorError, Oper));
            }
        }
Ejemplo n.º 39
0
        public ScriptConstExpr(AstNodeArgs args)
            : base(args)
        {
            TokenAst constant = (TokenAst)ChildNodes[0];

            Value = constant.Value;

            if (constant.IsKeyword)
            {
                if (Value.Equals("true"))
                {
                    Value = true;
                }
                else if (Value.Equals("false"))
                {
                    Value = false;
                }
                else if (Value.Equals("null"))
                {
                    Value = null;
                }
            }
        }
Ejemplo n.º 40
0
    public ScriptQualifiedName(AstNodeArgs args)
      : base(args)
    {
      IsVariable = false;
      NextFirst = false;
      IsVar = false;

      if (ChildNodes.Count == 2 && ChildNodes[1].ChildNodes.Count == 0)
      {
        _identifier = ExtractId(((TokenAst)ChildNodes[0]).Text);
        IsVariable = true;

        _evaluation = EvaluateIdentifier;
        _assignment = AssignIdentifier;
      }
      else
        if (ChildNodes[0] is TokenAst && ChildNodes[1].ChildNodes.Count != 0)
        {
          _identifier = ExtractId(((TokenAst)ChildNodes[0]).Text);

          //NOTE: There might be two cases:
          //      1) a()[]...() 
          //      2) a<>.(NamePart)    
          _modifiers = new List<ScriptAst>();
          foreach (ScriptAst node in ChildNodes[1].ChildNodes)
            _modifiers.Add(node);

          var generic = _modifiers.FirstOrDefault() as ScriptGenericsPostfix;
          if (generic != null && _modifiers.Count == 1)
          {
            //Case 2
            _evaluation = EvaluateGenericType;
            _assignment = null;
          }
          else
          {
            //Case 1
            _evaluation = EvaluateFunctionCall;
            _assignment = AssignArray;
          }
        }
        else
        {
          _namePart = ChildNodes[0] as ScriptQualifiedName;
          _identifier = ExtractId(((TokenAst)ChildNodes[2]).Text);
          NextFirst = true;
          if (ChildNodes.Count == 4 && ChildNodes[3].ChildNodes.Count != 0)
          {
            _modifiers = new List<ScriptAst>();
            foreach (ScriptAst node in ChildNodes[3].ChildNodes)
            {
              _modifiers.Add(node);
            }
          }
          _evaluation = EvaluateNamePart;
          _assignment = AssignNamePart;
        }
    }
Ejemplo n.º 41
0
 public ScriptArrayConstructor(AstNodeArgs args)
     : base(args)
 {
   _exprList = (ScriptExprList)ChildNodes[0];
 }
Ejemplo n.º 42
0
 public ScriptNewArrStmt(AstNodeArgs args)
   : base(args)
 {
   _constrExpr = ChildNodes[1] as ScriptTypeExpr;
   _arrRank = ChildNodes[2] as ScriptArrayResolution;
 }
Ejemplo n.º 43
0
 public ScriptFuncContractPost(AstNodeArgs args)
     : base(args)
 {
     _list = ChildNodes[1] as ScriptExprList;
 }
Ejemplo n.º 44
0
 public ScriptProg(AstNodeArgs args)
     : base(args)
 {
     Elements = ChildNodes[0] as ScriptElements;
 }
Ejemplo n.º 45
0
 public ScriptMObjectPart(AstNodeArgs args)
     : base(args)
 {
     _name = ((TokenAst)ChildNodes[0]).Text;
     _expr = ChildNodes[2] as ScriptExpr;
 }
Ejemplo n.º 46
0
 public ScriptVarExpr(AstNodeArgs args)
     : base(args)
 {
     _symbol     = ((TokenAst)ChildNodes[0]).Text;
     _identifier = ((TokenAst)ChildNodes[1]).Text;
 }
Ejemplo n.º 47
0
 public ScriptUsingStatement(AstNodeArgs args)
     : base(args)
 {
   _name = args.ChildNodes[1] as ScriptQualifiedName;
   _statement = args.ChildNodes[2] as ScriptAst;
 }
Ejemplo n.º 48
0
 public ScriptFunctionCall(AstNodeArgs args)
   : base(args)
 {
   if (ChildNodes.Count != 0)
     _funcArgs = ChildNodes[0] as ScriptExprList;
 }
Ejemplo n.º 49
0
 public ScriptSwitchCaseStatement(AstNodeArgs args)
     : base(args)
 {
   _cond = ChildNodes[1] as ScriptExpr;
   _statement = ChildNodes[3] as ScriptStatement;
 }
Ejemplo n.º 50
0
 public ScriptAstTemplate(AstNodeArgs args)
     : base(args)
 {
 }
Ejemplo n.º 51
0
 public ScriptNewStmt(AstNodeArgs args)
     : base(args)
 {
   _constrExpr = ChildNodes[1] as ScriptTypeConstructor;      
 }
Ejemplo n.º 52
0
 public ScriptTypeConstructor(AstNodeArgs args)
     : base(args)
 {
     _typeExpr = ChildNodes[0] as ScriptTypeExpr;
     _callExpr = ChildNodes[1] as ScriptFunctionCall;
 }
Ejemplo n.º 53
0
 public ScriptCompoundStatement(AstNodeArgs args)
   : base(args)
 {
   ShouldCreateScope = true;
 }
Ejemplo n.º 54
0
 public ScriptCondition(AstNodeArgs args)
     : base(args)
 {
     _conditionExpression = (ScriptExpr)ChildNodes[0];
 }
Ejemplo n.º 55
0
 public ScriptNewArrStmt(AstNodeArgs args)
     : base(args)
 {
     _constrExpr = ChildNodes[1] as ScriptTypeExpr;
     _arrRank    = ChildNodes[2] as ScriptArrayResolution;
 }
Ejemplo n.º 56
0
 public ScriptGlobalList(AstNodeArgs args)
   : base(args)
 {
   Parameters = ChildNodes[1] as ScriptFuncParameters;
 }
Ejemplo n.º 57
0
 public ScriptRefExpr(AstNodeArgs args)
   : base(args)
 {
   _symbol = ((TokenAst)ChildNodes[0]).Text;
   _identifier = ((TokenAst)ChildNodes[1]).Text;
 }
Ejemplo n.º 58
0
 public ScriptFuncContractPre(AstNodeArgs args)
   : base(args)
 {
   _list = ChildNodes[1] as ScriptExprList;
 }
Ejemplo n.º 59
0
 public ScriptProg(AstNodeArgs args)
   : base(args)
 {
   Elements = ChildNodes[0] as ScriptElements;
 }
Ejemplo n.º 60
0
 public ScriptTypeExprList(AstNodeArgs args)
     : base(args)
 {
 }