Ticket #211 (closed enhancement: fixed)
Add implicit line continuation for lines ending in an operator.
Reported by: | nevdelap | Owned by: | Chuck |
---|---|---|---|
Priority: | minor | Milestone: | |
Component: | Cobra Compiler | Version: | 0.8.0 |
Keywords: | Cc: |
Description
I searched for a ticket along these lines and didn't find one so I'm adding this just so it doesn't fall through the cracks. Comes out of...
http://cobra-language.com/forums/viewtopic.php?f=4&t=142
Chuck, "I was thinking that if the line ends on an operator then it's pretty obvious that it continues."
Example: (Alignments will be correct when pasted into your editor.)
class Program def main print 1 + 2 # ok print (1 + # ok 2) print 1 + # This ticket: Expecting an expression. 2 print (1 + # Ticket 210: Cannot mix tabs and spaces in indentation. 2) print 1 + # Both tickets. 2 a = 1 b = 2 assert (a == 1 and # ok b == 2) assert a == 1 and # Both tickets. b == 2
Attachments
Change History
Note: See
TracTickets for help on using
tickets.