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

Re: [jasspa] Indent Mode Question

Expand Messages
  • Bryan Schofield
    hmmm... you may have to use 2 indent schemes and switch when you encounter a Off the top of my head something like this may work... ; define a new indent
    Message 1 of 6 , Nov 27, 2006
    View Source
    • 0 Attachment
      hmmm... you may have to use 2 indent schemes and switch when you encounter a "

      Off the top of my head something like this may work...

      ; define a new indent scheme for quoted strings
      set-variable .indent.icon-q &pinc .hilight.next 1
      0 indent .indent.icon-q 1 20

      ; have the indent scheme change to quoted scheme
      ; when a " is encountered and change back when a
      ; another non-escaped " is encountered
      indent .indent.icon t "\"" .indent.icon-q
      indent .indent.icon-q t "[^\\]\"" .indent.icon

      ; continue a line if a trailing _ is found
      indent .indent.icon-q c "_\s*$" t


      On 11/27/06, Jeremy Cowgar <jeremy@...> wrote:
      >
      > One more question and I think I then have a basic working mode for
      > Icon! Yippie!
      >
      > In Icon, you can extend a string onto multiple lines by making the
      > last character a _
      >
      > i.e.
      >
      > "John Doe had a dog"
      >
      > is the *exact* same as:
      >
      > "John Doe_
      > had a dog"
      >
      > _ says skip everything until the next non-whitespace.
      >
      > So, my problem lies in the fact that I am ignoring comments inside of
      > quotes:
      >
      > indent .hilight.icon e "\"" "\"" "\\"
      >
      > Any thoughts on a workaround for this? I'd like _ to cause a
      > continuation indent.
      >
      > Jeremy
    Your message has been successfully submitted and would be delivered to recipients shortly.