code / tomo

Lines41.3K C23.7K Markdown9.7K YAML5.0K Tomo2.3K
7 others 763
Python231 Shell230 make212 INI47 Text21 SVG16 Lua6
(22 lines)
1 // This file defines how to compile text
3 #pragma once
5 #include "../ast.h"
6 #include "../environment.h"
7 #include "../stdlib/datatypes.h"
8 #include "../stdlib/text.h"
9 #include "../stdlib/util.h"
10 #include "../types.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("\""));