| ... | ... | @@ -27,3 +27,23 @@ Cons: |
|
|
|
- more complicated to explain than just disallowing tabs altogether
|
|
|
|
- more to implement
|
|
|
|
- hard to precicely specify, language syntax extensions would have to be careful not to turn valid programs into invalid one due to this rule.
|
|
|
|
|
|
|
|
## Concrete implementation idea for the above
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
leading tabs are tabs that precede the first non-whitespace character on a line.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if leading tabs are present, all leading whitespace must be made up of tabs.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Allow leading tabs only if the current line establishes a new indentation level and all enclosing indentation levels were established with tabs. You must use leading tabs to continue a tab established indentation level, even when you are not adding a new statement but rather continuing the previous line.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
any line that contains tabs in a non-leading position may not establish a new indentation level. (as in, the body of a let,where, etc must all be on the current line or start on the next line.)
|
|
|
|
|
|
|
|
|