コード例 #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, "+"));
            }
        }
コード例 #2
0
ファイル: ScriptFuncContract.cs プロジェクト: singba/SSharp
 public ScriptFuncContract(AstNodeArgs args)
     : base(args)
 {
     _pre  = ChildNodes[0] as ScriptFuncContractPre;
     _post = ChildNodes[1] as ScriptFuncContractPost;
     _inv  = ChildNodes[2] as ScriptFuncContractInv;
 }
コード例 #3
0
 public ScriptFuncContract(AstNodeArgs args)
     : base(args)
 {
   _pre = ChildNodes[0] as ScriptFuncContractPre;
   _post = ChildNodes[1] as ScriptFuncContractPost;
   _inv = ChildNodes[2] as ScriptFuncContractInv;
 }
コード例 #4
0
 public ScriptForEachStatement(AstNodeArgs args)
     : base(args)
 {
     _name      = (TokenAst)ChildNodes[1];
     _expr      = (ScriptExpr)ChildNodes[3];
     _statement = (ScriptStatement)ChildNodes[4];
 }
コード例 #5
0
ファイル: ScriptQualifiedName.cs プロジェクト: ugurak/SSharp
        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;
            }
        }
コード例 #6
0
 public ScriptForEachStatement(AstNodeArgs args)
   : base(args)
 {
   _name = (TokenAst)ChildNodes[1];
   _expr = (ScriptExpr)ChildNodes[3];
   _statement = (ScriptStatement)ChildNodes[4];
 }
コード例 #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, "+"));
    }
コード例 #8
0
 public ScriptArrayResolution(AstNodeArgs args)
     : base(args)
 {
     if (args.ChildNodes.Count != 0)
     {
         _args = args.ChildNodes[0] as ScriptExprList;
     }
 }
コード例 #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;
 }
コード例 #10
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;
 }
コード例 #11
0
ファイル: ScriptFunctionCall.cs プロジェクト: singba/SSharp
 public ScriptFunctionCall(AstNodeArgs args)
     : base(args)
 {
     if (ChildNodes.Count != 0)
     {
         _funcArgs = ChildNodes[0] as ScriptExprList;
     }
 }
コード例 #12
0
ファイル: ScriptIsExpr.cs プロジェクト: eightrivers/SSharp
    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"));
    }
コード例 #13
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];
    }
コード例 #14
0
ファイル: ScriptConstExpr.cs プロジェクト: eightrivers/SSharp
    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;
    }
コード例 #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);
      }
    }
コード例 #16
0
ファイル: ScriptIfStatement.cs プロジェクト: singba/SSharp
 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];
     }
 }
コード例 #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];
   }
 }
コード例 #18
0
ファイル: ScriptIsExpr.cs プロジェクト: singba/SSharp
        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"));
            }
        }
コード例 #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;
 }
コード例 #20
0
ファイル: ScriptMetaExpr.cs プロジェクト: DenisVuyka/SSharp
        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 };
        }
コード例 #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;
    }
コード例 #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];
            }
        }
コード例 #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;
     }
 }
コード例 #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);
            }
        }
コード例 #25
0
ファイル: ScriptConstExpr.cs プロジェクト: HaKDMoDz/eStd
    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;
      }
    }
コード例 #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, "+,-"));
    }
コード例 #27
0
ファイル: ScriptUnaryExpr.cs プロジェクト: eightrivers/SSharp
 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;
   }
 }
コード例 #28
0
ファイル: ScriptUnaryExpr.cs プロジェクト: singba/SSharp
 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;
     }
 }
コード例 #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;
            }
        }
コード例 #30
0
ファイル: ScriptMetaExpr.cs プロジェクト: singba/SSharp
        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
            };
        }
コード例 #31
0
ファイル: ScriptBinExpr.cs プロジェクト: eightrivers/SSharp
    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));
    }
コード例 #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);
                }
            }
        }
コード例 #33
0
ファイル: ScriptMObject.cs プロジェクト: eightrivers/SSharp
    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);
        }
      }
    }
コード例 #34
0
ファイル: ScriptTypeExpr.cs プロジェクト: eightrivers/SSharp
 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);
     }
 }
コード例 #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);
     }
 }
コード例 #36
0
ファイル: ScriptConstExpr.cs プロジェクト: ugurak/SSharp
        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;
            }
        }
コード例 #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;
            }
        }
コード例 #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));
            }
        }
コード例 #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;
                }
            }
        }
コード例 #40
0
ファイル: ScriptQualifiedName.cs プロジェクト: HaKDMoDz/eStd
    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;
        }
    }
コード例 #41
0
 public ScriptArrayConstructor(AstNodeArgs args)
     : base(args)
 {
   _exprList = (ScriptExprList)ChildNodes[0];
 }
コード例 #42
0
 public ScriptNewArrStmt(AstNodeArgs args)
   : base(args)
 {
   _constrExpr = ChildNodes[1] as ScriptTypeExpr;
   _arrRank = ChildNodes[2] as ScriptArrayResolution;
 }
コード例 #43
0
 public ScriptFuncContractPost(AstNodeArgs args)
     : base(args)
 {
     _list = ChildNodes[1] as ScriptExprList;
 }
コード例 #44
0
 public ScriptProg(AstNodeArgs args)
     : base(args)
 {
     Elements = ChildNodes[0] as ScriptElements;
 }
コード例 #45
0
ファイル: ScriptMObjectPart.cs プロジェクト: singba/SSharp
 public ScriptMObjectPart(AstNodeArgs args)
     : base(args)
 {
     _name = ((TokenAst)ChildNodes[0]).Text;
     _expr = ChildNodes[2] as ScriptExpr;
 }
コード例 #46
0
 public ScriptVarExpr(AstNodeArgs args)
     : base(args)
 {
     _symbol     = ((TokenAst)ChildNodes[0]).Text;
     _identifier = ((TokenAst)ChildNodes[1]).Text;
 }
コード例 #47
0
 public ScriptUsingStatement(AstNodeArgs args)
     : base(args)
 {
   _name = args.ChildNodes[1] as ScriptQualifiedName;
   _statement = args.ChildNodes[2] as ScriptAst;
 }
コード例 #48
0
 public ScriptFunctionCall(AstNodeArgs args)
   : base(args)
 {
   if (ChildNodes.Count != 0)
     _funcArgs = ChildNodes[0] as ScriptExprList;
 }
コード例 #49
0
 public ScriptSwitchCaseStatement(AstNodeArgs args)
     : base(args)
 {
   _cond = ChildNodes[1] as ScriptExpr;
   _statement = ChildNodes[3] as ScriptStatement;
 }
コード例 #50
0
 public ScriptAstTemplate(AstNodeArgs args)
     : base(args)
 {
 }
コード例 #51
0
ファイル: ScriptNewStmt.cs プロジェクト: eightrivers/SSharp
 public ScriptNewStmt(AstNodeArgs args)
     : base(args)
 {
   _constrExpr = ChildNodes[1] as ScriptTypeConstructor;      
 }
コード例 #52
0
 public ScriptTypeConstructor(AstNodeArgs args)
     : base(args)
 {
     _typeExpr = ChildNodes[0] as ScriptTypeExpr;
     _callExpr = ChildNodes[1] as ScriptFunctionCall;
 }
コード例 #53
0
 public ScriptCompoundStatement(AstNodeArgs args)
   : base(args)
 {
   ShouldCreateScope = true;
 }
コード例 #54
0
ファイル: ScriptCondition.cs プロジェクト: singba/SSharp
 public ScriptCondition(AstNodeArgs args)
     : base(args)
 {
     _conditionExpression = (ScriptExpr)ChildNodes[0];
 }
コード例 #55
0
ファイル: ScriptNewArrStmt.cs プロジェクト: singba/SSharp
 public ScriptNewArrStmt(AstNodeArgs args)
     : base(args)
 {
     _constrExpr = ChildNodes[1] as ScriptTypeExpr;
     _arrRank    = ChildNodes[2] as ScriptArrayResolution;
 }
コード例 #56
0
 public ScriptGlobalList(AstNodeArgs args)
   : base(args)
 {
   Parameters = ChildNodes[1] as ScriptFuncParameters;
 }
コード例 #57
0
ファイル: ScriptRefExpr.cs プロジェクト: eightrivers/SSharp
 public ScriptRefExpr(AstNodeArgs args)
   : base(args)
 {
   _symbol = ((TokenAst)ChildNodes[0]).Text;
   _identifier = ((TokenAst)ChildNodes[1]).Text;
 }
コード例 #58
0
 public ScriptFuncContractPre(AstNodeArgs args)
   : base(args)
 {
   _list = ChildNodes[1] as ScriptExprList;
 }
コード例 #59
0
ファイル: ScriptProg.cs プロジェクト: eightrivers/SSharp
 public ScriptProg(AstNodeArgs args)
   : base(args)
 {
   Elements = ChildNodes[0] as ScriptElements;
 }
コード例 #60
0
ファイル: ScriptTypeExprList.cs プロジェクト: singba/SSharp
 public ScriptTypeExprList(AstNodeArgs args)
     : base(args)
 {
 }