Minor revision...

This commit is contained in:
Ognjen Milan Robovic 2024-04-04 16:45:26 -04:00
parent 59b8891b89
commit db17dab7b1
2 changed files with 10 additions and 10 deletions

6
heyo.x
View File

@ -1,9 +1,9 @@
type integer = 4;
type character = 1;
text: character [] = "Heyo world!";
size: integer = 12;
main ():
system (1, 1, #text, size);
return;;
text: character [] = "Heyo world!";
size: integer = 12;

View File

@ -55,13 +55,13 @@ int main (void) {
int coin_ignore = syntax_define (false, false, "---", "\n", '\\', colour_pink, effect_normal);
int coin_string = syntax_define (false, false, "\"", "\"", '\\', colour_red, effect_normal);
int coin_type = syntax_define (false, true, "type", " \t\n", '\0', colour_yellow, effect_normal);
int coin_loop = syntax_define (false, true, "loop", " \t\n", '\0', colour_yellow, effect_normal);
int coin_if = syntax_define (false, true, "if", " \t\n", '\0', colour_yellow, effect_normal);
int coin_else = syntax_define (false, true, "else", " \t\n", '\0', colour_yellow, effect_normal);
int coin_case = syntax_define (false, true, "case", " \t\n", '\0', colour_yellow, effect_normal);
int coin_return = syntax_define (false, true, "return", " \t\n", '\0', colour_yellow, effect_normal);
int coin_loop = syntax_define (false, true, "loop", " \t\n(:", '\0', colour_yellow, effect_normal);
int coin_if = syntax_define (false, true, "if", " \t\n(", '\0', colour_yellow, effect_normal);
int coin_else = syntax_define (false, true, "else", " \t\n:", '\0', colour_yellow, effect_normal);
int coin_case = syntax_define (false, true, "case", " \t\n(", '\0', colour_yellow, effect_normal);
int coin_return = syntax_define (false, true, "return", " \t\n(;", '\0', colour_yellow, effect_normal);
int coin_import = syntax_define (false, true, "import", " \t\n", '\0', colour_yellow, effect_normal);
int coin_system = syntax_define (false, true, "system", " \t\n", '\0', colour_yellow, effect_normal);
int coin_system = syntax_define (false, true, "system", " \t\n(", '\0', colour_yellow, effect_normal);
int coin_number = syntax_define (true, true, "0123456789", " \t\n,.;:()[]#", '\0', colour_blue, effect_normal);
int coin_marker = syntax_define (true, true, "abcdefghijklmnopqrstuvwxyz_", " \t\n,.;:()[]#", '\0', colour_white, effect_normal);
int coin_symbol = syntax_define (true, false, ",.;:=#[]()+-*/%&|!", "", '\0', colour_cyan, effect_normal);
@ -71,7 +71,7 @@ int main (void) {
for (offset = 0; buffer [offset] != '\0'; offset += length) {
select = syntax_select (& buffer [offset], & length);
if (select >= syntax_count) {
terminal_colour (colour_red, effect_reverse);
terminal_colour (colour_grey, effect_normal);
} else {
terminal_colour (syntax_colour [select], syntax_effect [select]);
}