static bool GroupIsActive(Racr.AstNode n) { var v = n.GetExpression().Value(); if (v == null) return false; return (bool) v; }
static bool GroupIsLValid(Racr.AstNode n) { return n.GetExpression().Type() == ValueTypes.Boolean; }
static string ComputedQuestionSExpr(Racr.AstNode n) { return "(~? '" + n.GetName() + " " + Lexer.EscapeString(n.GetLabel()) + " " + n.GetExpression().SExpr() + ")"; }
static string GroupSExpr(Racr.AstNode n) { return "(If " + n.GetExpression().SExpr() + " " + String.Join(" ", n.GetBody().Children().Select(x => ((Racr.AstNode)x).SExpr())) + ")"; }
static object ComputedQuestionValue(Racr.AstNode n) { return n.GetExpression().Value(); }
static ValueTypes ComputedQuestionType(Racr.AstNode n) { return n.GetExpression().Type(); }