示例#1
0
 public UnaryExpression(Parser yyp, string unarySymbol, Expression e)
     : base(((LSLSyntax
         )yyp))
 {
     m_unarySymbol = unarySymbol;
     AddExpression(e);
 }
示例#2
0
 public VectorConstant(Parser yyp, Expression valX, Expression valY, Expression valZ)
     : base(((LSLSyntax
         )yyp), "vector", null)
 {
     kids.Add(valX);
     kids.Add(valY);
     kids.Add(valZ);
 }
示例#3
0
 public RotationConstant(Parser yyp, Expression valX, Expression valY, Expression valZ, Expression valS)
     : base(((LSLSyntax
         )yyp), "rotation", null)
 {
     kids.Add(valX);
     kids.Add(valY);
     kids.Add(valZ);
     kids.Add(valS);
 }
示例#4
0
 public Statement(Parser yyp, Expression e)
     : base(((LSLSyntax
         )yyp))
 {
     kids.Add(e);
 }
示例#5
0
 public ReturnStatement(Parser yyp, Expression e)
     : base(((LSLSyntax
         )yyp))
 {
     if (e is ConstantExpression) while (0 < e.kids.Count) kids.Add(e.kids.Pop());
     else kids.Add(e);
 }
示例#6
0
 public BinaryExpression(Parser yyp, Expression lhs, Expression rhs, string expressionSymbol)
     : base(((LSLSyntax
         )yyp))
 {
     m_expressionSymbol = expressionSymbol;
     AddExpression(lhs);
     AddExpression(rhs);
 }
示例#7
0
 public ForLoopStatement(Parser yyp, ForLoopStatement fls, Expression e)
     : base(((LSLSyntax
         )yyp))
 {
     while (0 < fls.kids.Count) kids.Add(fls.kids.Pop());
     kids.Add(e);
 }
示例#8
0
 public ForLoop(Parser yyp, ForLoopStatement flsa, Expression e, ForLoopStatement flsb, Statement s)
     : base(((LSLSyntax
         )yyp))
 {
     kids.Add(flsa);
     kids.Add(e);
     kids.Add(flsb);
     if (0 < s.kids.Count && s.kids.Top is CompoundStatement) kids.Add(s.kids.Pop());
     else kids.Add(s);
 }
示例#9
0
 protected void AddExpression(Expression e)
 {
     if (e is ConstantExpression) while (0 < e.kids.Count) kids.Add(e.kids.Pop());
     else kids.Add(e);
 }