Re: [swift-dev] Breaking change in lexing operators next to comments

2015-12-20 Thread Jesse Rusak via swift-dev
> On Dec 17, 2015, at 10:41 PM, Jesse Rusak wrote: > > >> On Dec 17, 2015, at 1:08 PM, Chris Lattner > > wrote: >> >>> >>> On Dec 17, 2015, at 6:32 AM, Jesse Rusak via swift-dev >> > wrote: >>> >>> Any other comments about this? Can some

Re: [swift-dev] Breaking change in lexing operators next to comments

2015-12-17 Thread Jesse Rusak via swift-dev
> On Dec 17, 2015, at 1:08 PM, Chris Lattner wrote: > >> >> On Dec 17, 2015, at 6:32 AM, Jesse Rusak via swift-dev > > wrote: >> >> Any other comments about this? Can someone from the core team make a call on >> this, or should we ask for comments on swift-evolutio

Re: [swift-dev] Breaking change in lexing operators next to comments

2015-12-17 Thread John McCall via swift-dev
> On Dec 17, 2015, at 6:32 AM, Jesse Rusak via swift-dev > wrote: > Any other comments about this? Can someone from the core team make a call on > this, or should we ask for comments on swift-evolution? It has to go through swift-evolution anyway, but yes, I completely agree that comments shou

Re: [swift-dev] Breaking change in lexing operators next to comments

2015-12-17 Thread Chris Lattner via swift-dev
> On Dec 17, 2015, at 6:32 AM, Jesse Rusak via swift-dev > wrote: > > Any other comments about this? Can someone from the core team make a call on > this, or should we ask for comments on swift-evolution? I think it makes sense to bring it up on swift-evolution. I tend to agree with your ar

Re: [swift-dev] Breaking change in lexing operators next to comments

2015-12-17 Thread Jesse Rusak via swift-dev
Any other comments about this? Can someone from the core team make a call on this, or should we ask for comments on swift-evolution? > On Dec 15, 2015, at 7:15 PM, Jesse Rusak wrote: > >>> On Dec 14, 2015, at 9:42 PM, Chris Lattner via swift-dev >>> mailto:swift-dev@swift.org>> wrote: > >>> T

Re: [swift-dev] Breaking change in lexing operators next to comments

2015-12-15 Thread Jesse Rusak via swift-dev
>> On Dec 14, 2015, at 9:42 PM, Chris Lattner via swift-dev >> mailto:swift-dev@swift.org>> wrote: >> There are two defensible models here: >> >> 1) comments should be treated as whitespace. >> 2) comments should be treated as if they were not present. >> >> The later model seems more ideal to

Re: [swift-dev] Breaking change in lexing operators next to comments

2015-12-14 Thread Chris Lattner via swift-dev
> On Dec 14, 2015, at 9:51 PM, Simon Pilkington > wrote: > > It seems to make more sense to treat comments as this if they are not present. > > As a related question, should the presence/absence of whitespace be important > at all? It seems fragile if it is. The current design depends on whi

Re: [swift-dev] Breaking change in lexing operators next to comments

2015-12-14 Thread John Calsbeek via swift-dev
If you treat comments as though they are not present, you can no longer reason locally about whitespace on either side of an operator. Straw example: foo/* insert an excerpt from War and Peace here */! I need to scan to the other side of the comment to determine if ! is preceded by whitespace.

Re: [swift-dev] Breaking change in lexing operators next to comments

2015-12-14 Thread Simon Pilkington via swift-dev
It seems to make more sense to treat comments as this if they are not present. As a related question, should the presence/absence of whitespace be important at all? It seems fragile if it is. -Simon > On 14 Dec 2015, at 9:42 PM, Chris Lattner via swift-dev > wrote: > >> >> On Dec 14, 2015,

Re: [swift-dev] Breaking change in lexing operators next to comments

2015-12-14 Thread Chris Lattner via swift-dev
> On Dec 14, 2015, at 8:15 PM, Jesse Rusak via swift-dev > wrote: > > Hi all, > > I’m investigating this bug: https://bugs.swift.org/browse/SR-186 > > > Which appears to be a result of the fact that the logic that determines if an > operator is prefix/

[swift-dev] Breaking change in lexing operators next to comments

2015-12-14 Thread Jesse Rusak via swift-dev
Hi all, I’m investigating this bug: https://bugs.swift.org/browse/SR-186 Which appears to be a result of the fact that the logic that determines if an operator is prefix/postfix/binary does not treat comments as whitespace. So, for example: /* comment */!foo does not lex as expected because t