Ticket #112 (new enhancement)
Allow extra spaces for alignment inside line continuations only
Reported by: | Chuck | Owned by: | |
---|---|---|---|
Priority: | medium | Milestone: | |
Component: | Cobra Compiler | Version: | 0.8.0 |
Keywords: | Cc: |
Description
This is a controlled violation of the "you cannot mix tabs and spaces" rule.
An example:
class X def fooBar(i as int, j as int) as int is shared return i + j def main is shared assert .fooBar(2, 3) == 5
That example will make more sense when viewed in your editor. The "j as int) ..." line is indented with TABs like the rest of the source, but then 3 additional SPACEs are used to line up the j underneath the i.
- 1 - 3 spaces
- No more than 3
- Not allowed outside of line continuations
- Also, cook up the same example with spaces only, no tabs. (In that case there is no such detection as "1 - 3" spaces.)
- Test cases for TABs followed by 4 or more spaces producing an error.
Change History
Note: See
TracTickets for help on using
tickets.