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