Retoor software development Projects Research SearchXNG
Register Sign In

15 lines
219 B
Plaintext
Raw Normal View History

feat: add include functionality to support modular template composition Implement the `include` directive that allows embedding external template files into the current template at render time. This enables code reuse and separation of concerns by letting templates import shared components like headers, footers, or partials. The feature parses include statements, resolves file paths relative to the template root, and recursively renders the included content within the parent template's variable scope.
2025-11-23 15:23:59 +01:00
#include "math_lib.rc"
#include "string_lib.rc"
int is_even(int n) {
int half = divide(n, 2);
return multiply(half, 2) == n;
}
int is_odd(int n) {
if (is_even(n)) {
return 0;
}
return 1;
}
Reference in New Issue Copy Permalink
cfab51abd8
rc/tests/includes/utils.rc
Response time: 75ms
Mail Licenses API