alec

Abstraction Layer for Escape Codes
git clone git://git.dimitrijedobrota.com/alec.git
Log | Files | Refs | README | LICENSE | HACKING | CONTRIBUTING | CODE_OF_CONDUCT | BUILDING |

commite3a380226dee9e79220e2dc4aeec6de0d8186159
parent9892f3a46e97ac793b2cbd785270f3177813d3b2
authorDimitrije Dobrota <mail@dimitrijedobrota.com>
dateTue, 27 Feb 2024 18:33:36 +0000

Remove trailing whitespace

Diffstat:
Msrc/lexer.l|++
Msrc/rules|+-

2 files changed, 3 insertions(+), 1 deletions(-)


diff --git a/src/lexer.l b/src/lexer.l

@@ -18,6 +18,8 @@ LINE_END (\n|\r|\r\n)

, { return COMMA; }
[^,\n]* {
char *p = yytext + strlen(yytext) - 1;
while(isspace(*p)) *p-- = '\0';
while(*yytext && isspace(*yytext)) yytext++;
yylval.n = strdup(yytext); return LITERAL;
}

diff --git a/src/rules b/src/rules

@@ -24,7 +24,7 @@ limit_256

background
int R, int G, int B
limit_256
38, ';', 5, ';', R, ';', G, ';', B, 'm'
38 , ';', 5, ';', R, ';', G, ';', B, 'm'
// comment
foreground
COLOR color