mirror of
https://gitdl.cn/https://github.com/chakralinux/core.git
synced 2025-02-16 03:20:23 +08:00
21 lines
753 B
Diff
21 lines
753 B
Diff
diff --git a/src/turtle_lexer.l b/src/turtle_lexer.l
|
|
index c2f249b..f133747 100644
|
|
--- a/src/turtle_lexer.l
|
|
+++ b/src/turtle_lexer.l
|
|
@@ -381,9 +381,13 @@ EXPONENT [eE][+-]?[0-9]+
|
|
while(1) {
|
|
int c = yytext[yyleng - 1];
|
|
if(c == '{' || c == ' ' || c=='\t' || c == '\v' || c == '\n' ||
|
|
- c == ':' || c == '-') {
|
|
+ c == '=' ) {
|
|
yyleng--;
|
|
- } else
|
|
+ }
|
|
+ else if ( yyleng >= 2 && ( c == '-' && yytext[yyleng - 2] == ':' ) ) {
|
|
+ yyleng -= 2;
|
|
+ }
|
|
+ else
|
|
break;
|
|
}
|
|
yytext[yyleng] = '\0';
|