static public void UpdateQuestions(Racr.AstNode n) { switch (n.NodeType()) { case "Form": case "Group": foreach (var c in n.GetBody().Children()) UpdateQuestions(c as Racr.AstNode); break; case "ComputedQuestion": break; default: (n.Widget() as Widget).Set(n.Value()); break; } }
static string OrdinaryQuestionSExpr(Racr.AstNode n) { return "(?? '" + n.GetName() + " " + Lexer.EscapeString(n.GetLabel()) + " " + n.Type() + " " + Lexer.EscapeValue(n.Value()) + ")"; }
static string ConstantSExpr(Racr.AstNode n) { return "(~! " + Lexer.EscapeValue(n.Value()) + ")"; }
static bool ComputedQuestionRender(Racr.AstNode n) { (n.Widget() as Widget).Set(n.Value()); return true; }