Skip to content

Commit

Permalink
rim 7.4
Browse files Browse the repository at this point in the history
  • Loading branch information
elydre committed Jan 18, 2025
1 parent e93f94c commit 016044c
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion zapps/fatpath/rim.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
#define COLOR_U 0x80 // unknown character
#define COLOR_W 0x08 // whitespace

#define RIM_VERSION "7 rev 3"
#define RIM_VERSION "7 rev 4"

// GLOBALS
typedef struct {
Expand Down Expand Up @@ -310,6 +310,7 @@ uint16_t *calc_new_screen(int from_line, int to_line, int x_offset, int *cursor_
}
continue;
}

if (!isprint(g_data[g_data_lines[i] + j])) {
new_screen[line * SCREEN_W + j - x_offset + x] = '?' | (COLOR_U << 8);
localput_word(j - world_start);
Expand Down Expand Up @@ -877,6 +878,25 @@ void rim_syntax_init(char *lang) {
});
}

else if (strcmp(lang, "py") == 0) {
g_rim.syntax->words = 1;
g_rim.syntax->numbers = 1;
g_rim.syntax->funccalls = 1;
g_rim.syntax->braces = 1;
g_rim.syntax->strings = 1;

g_rim.syntax->keywords = copy_array((char *[]) {
"as", "assert", "async", "await", "break", "class", "continue", "del",
"elif", "else", "except", "finally", "for", "from", "if", "import",
"in", "pass", "raise", "return", "try", "while", "with", "yield", NULL
});

g_rim.syntax->blues = copy_array((char *[]) {
"False", "None", "True", "and", "def", "global", "is", "lambda",
"nonlocal", "not", "or", NULL
});
}

else if (strcmp(lang, "olv") == 0) {
g_rim.syntax->words = 1;
g_rim.syntax->numbers = 1;
Expand Down

0 comments on commit 016044c

Please sign in to comment.