public virtual object Walk(ExecExpression node) { if (Enter(node)) { node.CodeString.Accept(this); } Exit(node); return(null); }
public override object Walk(ExecExpression node) { var code = node.CodeString.Accept(this); if (!(code is BikeString)) { throw ErrorFactory.CreateTypeError("'exec' works only with string type"); } var str = ((BikeString)code).Value; return(string.IsNullOrWhiteSpace(str) ? null : Execute(str)); }
public ExprNode ParseAssignmentExpression() { if (Next().Is(TokenType.Exec)) { var evalExp = new ExecExpression { Token = Next() }; Match(TokenType.Exec); evalExp.CodeString = ParseAssignmentExpression(); return(evalExp); } ExprNode node; return(Speculate(ParseLeftAssignmentExpression, out node) ? node : ParseConditionalExpression()); }
public override bool Enter(ExecExpression node) { Print("EvalExpression"); level++; return true; }
public override void Exit(ExecExpression node) { level--; }
public virtual bool Enter(ExecExpression node) { return true; }
public virtual void Exit(ExecExpression node) { }
public virtual bool Enter(ExecExpression node) { return(true); }
public override bool Enter(ExecExpression node) { Print("EvalExpression"); level++; return(true); }
public override object Walk(ExecExpression node) { var code = node.CodeString.Accept(this); if (!(code is BikeString)) throw ErrorFactory.CreateTypeError("'exec' works only with string type"); var str = ((BikeString)code).Value; return string.IsNullOrWhiteSpace(str) ? null : Execute(str); }
public ExprNode ParseAssignmentExpression() { if (Next().Is(TokenType.Exec)) { var evalExp = new ExecExpression { Token = Next() }; Match(TokenType.Exec); evalExp.CodeString = ParseAssignmentExpression(); return evalExp; } ExprNode node; return Speculate(ParseLeftAssignmentExpression, out node) ? node : ParseConditionalExpression(); }
public virtual object Walk(ExecExpression node) { if (Enter(node)) { node.CodeString.Accept(this); } Exit(node); return null; }