diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2015-06-14 16:11:47 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2015-06-14 16:11:47 -0700 |
commit | 7fb3fccbb8f2a4b068a0e4bffa46a935e11db3a4 (patch) | |
tree | efe99f8da8dc4f6e82cbd29c050f494cf832035f /037call_reply.cc | |
parent | b1bfd9213244d0da4c5d99ef3adcec121b041380 (diff) | |
download | mu-7fb3fccbb8f2a4b068a0e4bffa46a935e11db3a4.tar.gz |
1564 - a better way to support string literals
Our new heuristic is: all string literals are the same. If they contain newline before non-whitespace, we scan for comments assuming there might be code inside: foofoofoo [ ... # ']' inside comment ignored ] If they contain non-whitespace first, then we ignore comments assuming it's just a regular string: foofoofoo [abc#def] # valid string literal The big hole in this approach: foofoofoo [ # what about comments here containing ']'? ... # abc ] Currently this reads as a 'code comment' and terminates before the newline or '?' and will probably trigger errors down the line. Temporary workaround: don't start code strings with a comment on the same line as the '['. Eventually we'll tighten up the logic. We're still not using the new heuristic in scenarios, but that's up next.
Diffstat (limited to '037call_reply.cc')
0 files changed, 0 insertions, 0 deletions