Loading ...
Sorry, an error occurred while loading the content.

29419Re: % matching for Python

Expand Messages
  • Benji Fisher
    Aug 6, 2002
    • 0 Attachment
      Benji Fisher wrote:
      >
      [snip]
      > Only small changes for now. Unless someone wants to see it, I will not
      > post my next version until the :omap's work, maybe tomorrow.

      I changed my mind; the changes were not so minor. Especially, since I now
      treat empty lines as comments, I revised my idea of what starts a new block.
      (In the example Python script I was looking at, there were empty lines
      separating blocks. I assumed that, having indent 0, they indicated the
      top-level block.) I now assume that in

      foo
      ...
      bar
      ...

      (where foo and bar have the same indent) then "bar" starts a new block unless it
      is recognized as a continuation: for example, if "foo" is "if" and "bar" is
      "elif" or "else".

      Please test this version with nested blocks, non-aligned comment lines,
      empty (and blank) lines, etc. If you like it, I will add the :omap's tomorrow.

      --Benji Fisher
    • Show all 16 messages in this topic