ref: a33d76f8c95d33d6590dd185a2200f06cef014c7
parent: 5ea7337ae78541f70bc3d26931427b913de22cbc
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Thu Sep 13 07:54:20 EDT 2018
ape/make: fix \ line continuation parsing
--- a/sys/src/ape/cmd/make/gram.y
+++ b/sys/src/ape/cmd/make/gram.y
@@ -321,17 +321,17 @@
break;
case '\n':
- ++yylineno;
- if(p==yytext || p[-1]!='\\')
- {
- *p = '\0';
- goto endloop;
- }
- p[-1] = ' ';
- while( (kc=getc(fin))=='\t' || kc==' ' || kc=='\n')
- if(kc == '\n')
- ++yylineno;
-
+ do {
+ ++yylineno;
+ if(p==yytext || p[-1]!='\\')
+ {
+ *p = '\0';
+ goto endloop;
+ }
+ p[-1] = ' ';
+ while( (kc=getc(fin))=='\t' || kc==' ')
+ ;
+ } while(kc == '\n');
if(kc != EOF)
break;
case EOF: