Exemplo n.º 1
0
	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;
		}
	}
Exemplo n.º 2
0
	static string OrdinaryQuestionSExpr(Racr.AstNode n) {
		return "(?? '" + n.GetName() + " " + Lexer.EscapeString(n.GetLabel()) + " " + n.Type() + " " + Lexer.EscapeValue(n.Value()) + ")";
	}
Exemplo n.º 3
0
	static string ConstantSExpr(Racr.AstNode n) {
		return "(~! " + Lexer.EscapeValue(n.Value()) + ")";
	}
Exemplo n.º 4
0
	static bool ComputedQuestionRender(Racr.AstNode n) {
		(n.Widget() as Widget).Set(n.Value());
		return true;
	}