From mboxrd@z Thu Jan 1 00:00:00 1970 From: erik quanstrom Date: Sun, 4 Sep 2011 00:44:25 -0400 To: 9fans@9fans.net Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: [9fans] unexpectedly low pH in acid Topicbox-Message-UUID: 18a43da8-ead7-11e9-9d60-3106f5b1d025 in my last email, i wanted to put a comment after the dump(...) statement, but it turns out that didn't work as expected. the problem is simple enough: acid // comments in acid mistakely consume the newline, leading to incorrect line numbers, &c. the fix for this is straightforward: after recognizing a // comment, continue with newline processing: - erik /n/dump/2011/0903/sys/src/cmd/acid/lex.c:329,334 - lex.c:329,342 case '\t': goto loop; + case '/': + c = lexc(); + if(c != '/'){ + unlexc(c); + return '/'; + } + eatnl(); + case '\n': line++; if(interactive == 0) /n/dump/2011/0903/sys/src/cmd/acid/lex.c:390,404 - lex.c:398,403 return Tinc; unlexc(c); return '+'; - - case '/': - c = lexc(); - if(c == '/') { - eatnl(); - goto loop; - } - unlexc(c); - return '/'; case '\'': c = lexc();