Article View: pl.comp.lang.javascript
Article #51476Re: Automatyczne wstawianie średników - pytanie
From: NotBear
Date: Thu, 16 Oct 2014 11:06
Date: Thu, 16 Oct 2014 11:06
24 lines
2018 bytes
2018 bytes
W dniu 2014-10-15 20:06, Piotrek pisze: > tzn. dlaczego 4 pierwsze linie nie mogą składać się > łącznie na deklarację zmiennej o nazwie "aa", połączoną > z jej inicjalizacją? Pewnie wynika to jakoś z definicji > języka, ale z zacytowanej regułki nie umiem tego wywnioskować. Bo reguła została nieco uproszczona, a oryginalna brzmi nieco inaczej. W tym konkretnym przypadku ma zastosowanie: "1. When, as the program is parsed from left to right, a token (called the offending token) is encountered that is not allowed by any production of the grammar, then a semicolon is automatically inserted before the offending token if one or more of the following conditions is true: - The offending token is separated from the previous token by at least one LineTerminator. - The offending token is }." Calosc: http://www.ecma-international.org/ecma-262/5.1/#sec-7.9.1 Czyli nie musi byc tam zadnych spacji, bo srednik jest wstawiany gdy problematyczny znak jest poprzedzony jednym lub kilkoma <LF>,<CR>,<LS>,<PS>. -- NotBear
Technical Details
Message-ID:
<m1o8rl$gkh$1@node1.news.atman.pl>Path:
mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!agh.edu.pl!news.agh.edu.pl!newsfeed2.atman.pl!newsfeed.atman.pl!.POSTED!not-for-mailReferences:
<df8855d0-5734-4dee-a9d3-8a149b139a27@googlegroups.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!agh.edu.pl!news.agh.edu.pl!newsfeed2.atman.pl!newsfeed.atman.pl!.POSTED!not-for-mail From: NotBear <paulcom.HATESPAM@interia.pl> Newsgroups: pl.comp.lang.javascript Subject: Re: Automatyczne wstawianie średników - pytanie Date: Thu, 16 Oct 2014 13:06:26 +0200 Organization: ATMAN - ATM S.A. Lines: 24 Message-ID: <m1o8rl$gkh$1@node1.news.atman.pl> References: <df8855d0-5734-4dee-a9d3-8a149b139a27@googlegroups.com> NNTP-Posting-Host: 217.17.39.162 Mime-Version: 1.0 X-Trace: node1.news.atman.pl 1413457589 17041 217.17.39.162 (16 Oct 2014 11:06:29 GMT) X-Complaints-To: usenet@atman.pl NNTP-Posting-Date: Thu, 16 Oct 2014 11:06:29 +0000 (UTC) User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 In-Reply-To: <df8855d0-5734-4dee-a9d3-8a149b139a27@googlegroups.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit