|
|
|
|
|
by revskill
1089 days ago
|
|
Algorithm to read scope: - Step 1: Find open bracket - Step 2: Find closed bracket With indentation, the algorithm now becomes: - Step 1: Find something which seems to open a scope. - Step 2: Scan all indentation level until it's done. The difference is huge here. |
|
I have a different algorithm:
- Find first indented line
- Find next unindented line
If that does not work for you, your code is bad.