Ticket #116 (closed defect: fixed)
multiline expression in if statement has undesirable restriction on indentation
Reported by: | hopscc | Owned by: | Chuck |
---|---|---|---|
Priority: | medium | Milestone: | |
Component: | Cobra Compiler | Version: | 0.8.0 |
Keywords: | Cc: |
Description
If write a multiline expression in an if statement unless the expression is indented like so
if a == 99 and b == 99 print 'compiled OK'
( i.e dangling expression on following line at same indentation)
you get a parse error
as in
if (a > 98 and b == 99 ) # trailing line 1 indent in print 'OK - 1' else print 'fail' # OR if (a > 98 and b == 99 ) # 2 indents in print 'OK - 2' else print 'fail'
Parse error is something like
Expecting INDENT, but got "print" instead.
Error genereted is actually on first line of following block.
Attachments
Change History
Note: See
TracTickets for help on using
tickets.