1 // This file defines how to compile text
6 #include "../environment.h"
7 #include "../stdlib/datatypes.h"
8 #include "../stdlib/text.h"
9 #include "../stdlib/util.h"
12 Text_t compile_text_ast(env_t *env, ast_t *ast);
13 Text_t compile_text(env_t *env, ast_t *ast, Text_t color);
14 Text_t compile_text_literal(Text_t literal);
15 Text_t expr_as_text(Text_t expr, type_t *t, Text_t color);
17 MACROLIKE Text_t quoted_str(const char *str) {
18 return Text$quoted(Text$from_str(str), false, Text("\""));
20 MACROLIKE Text_t quoted_text(Text_t text) {
21 return Text$quoted(text, false, Text("\""));