Exemplo n.º 1
0
	static string UseSExpr(Racr.AstNode n) {
		return "(~> '" + n.GetName() + ")";
	}
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 ComputedQuestionSExpr(Racr.AstNode n) {
		return "(~? '" + n.GetName() + " " + Lexer.EscapeString(n.GetLabel()) + " " + n.GetExpression().SExpr() + ")";
	}
Exemplo n.º 4
0
	static object UseValue(Racr.AstNode n) { return n.FindActive(n.GetName()).Value(); }
Exemplo n.º 5
0
	static ValueTypes UseType(Racr.AstNode n) { return n.GLookup(n.GetName()).Type(); }
Exemplo n.º 6
0
	static bool QuestionIsActive(Racr.AstNode n) {
		return n.IsErrorQuestion() || (n.Parent().IsActive() && n.FindActive(n.GetName()).IsErrorQuestion());
	}
Exemplo n.º 7
0
	static bool QuestionIsLValid(Racr.AstNode n) {
		if (n.Type() == ValueTypes.ErrorType) return false;
		var prev = n.GLookup(n.GetName());
		return prev.IsErrorQuestion() || n.Type() == prev.Type();
	}
Exemplo n.º 8
0
	static Racr.AstNode QuestionLLookup(Racr.AstNode n, string name) {
		if (n.GetName() == name) return n;
		return null;
	}