Example #1
0
 public CExpression Application(CExpression fn, List <CExpression> list)
 {
     return(new Application {
         Function = fn,
         Arguments = list
     });
 }
Example #2
0
 public Stat DoWhileStatement(Stat doBody, CExpression expr)
 {
     return(new DoWhileStat
     {
         Body = doBody,
         Expression = expr,
     });
 }
Example #3
0
 public Stat WhileStatement(CExpression expr, Stat whileBody)
 {
     return(new WhileStat
     {
         Expression = expr,
         Body = whileBody
     });
 }
Example #4
0
 public int GetValue(CExpression cExpression)
 {
     if (cExpression != null)
     {
         value = Convert.ToInt32(cExpression.Accept(ceval));
     }
     return(value++);
 }
Example #5
0
 public CExpression ArrayAccess(CExpression e, CExpression idx)
 {
     return(new CArrayAccess
     {
         Expression = e,
         Index = idx,
     });
 }
Example #6
0
 public CExpression PostIncrement(CExpression e, CTokenType token)
 {
     return(new IncrementExpression
     {
         Expression = e,
         Incrementor = token,
         Prefix = false
     });
 }
Example #7
0
 public virtual CExpression Bin(CTokenType op, CExpression left, CExpression right)
 {
     return(new CBinaryExpression
     {
         Operation = op,
         Left = left,
         Right = right
     });
 }
Example #8
0
 public CExpression Conditional(CExpression cond, CExpression consequent, CExpression alternant)
 {
     return(new ConditionalExpression
     {
         Condition = cond,
         Consequent = consequent,
         Alternative = alternant,
     });
 }
Example #9
0
 public Stat IfStatement(CExpression expr, Stat consequence, Stat alternative)
 {
     return(new IfStat
     {
         Expression = expr,
         Consequence = consequence,
         Alternative = alternative,
     });
 }
Example #10
0
 public CExpression PtrMemberAccess(CExpression e, string fieldName)
 {
     return(new MemberExpression
     {
         Expression = e,
         Dereference = true,
         FieldName = fieldName,
     });
 }
Example #11
0
 public Stat ForStatement(Stat init, CExpression test, CExpression incr, Stat forBody)
 {
     return(new ForStat
     {
         Initializer = init,
         Test = test,
         Update = incr,
         Body = forBody
     });
 }
Example #12
0
 public CExpression Unary(CTokenType operation, CExpression expr)
 {
     return(new CUnaryExpression {
         Operation = operation, Expression = expr
     });
 }
Example #13
0
 public Enumerator Enumerator(string id, CExpression init)
 {
     return(new Enumerator {
         Name = id, Value = init
     });
 }
Example #14
0
 public Declarator ArrayDeclarator(Declarator decl, CExpression expr)
 {
     return(new ArrayDeclarator {
         Declarator = decl, Size = expr
     });
 }
Example #15
0
 public Stat ExprStatement(CExpression expr)
 {
     return(new ExprStat {
         Expression = expr
     });
 }
Example #16
0
 public FieldDeclarator FieldDeclarator(Declarator decl, CExpression bitField)
 {
     return(new FieldDeclarator {
         Declarator = decl, FieldSize = bitField
     });
 }
Example #17
0
 public Label CaseLabel(CExpression constExpr)
 {
     return(new CaseLabel {
         Value = constExpr
     });
 }
Example #18
0
 public CExpression ArrayAccess(CExpression e, CExpression idx)
 {
     throw new NotImplementedException();
 }
Example #19
0
 public CExpression PreIncrement(CTokenType token, CExpression uexpr)
 {
     throw new NotImplementedException();
 }
Example #20
0
 public CExpression Cast(CType type, CExpression exp)
 {
     return(new CastExpression {
         Type = type, Expression = exp
     });
 }
Example #21
0
 public Stat SwitchStatement(CExpression expr, Stat switchBody)
 {
     throw new NotImplementedException();
 }
Example #22
0
 public CExpression Sizeof(CExpression sexp)
 {
     return(new SizeofExpression {
         Expression = sexp
     });
 }
Example #23
0
 internal Initializer ExpressionInitializer(CExpression expr)
 {
     return(new ExpressionInitializer {
         Expression = expr
     });
 }
Example #24
0
 public CExpression Application(CExpression e)
 {
     throw new NotImplementedException();
 }
Example #25
0
 public Stat ReturnStatement(CExpression expr)
 {
     return(new ReturnStat {
         Expression = expr
     });
 }
Example #26
0
 public Stat IfStatement(CExpression expr, Stat consequence, Stat alternative)
 {
     throw new NotImplementedException();
 }