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

1289Indent question about modes

Expand Messages
  • jeremy@cowgar.com
    Dec 7, 2004
    • 0 Attachment
      I have a syntax file I am creating a highlighting mode for and it has
      things such as:

      clearing : Room
      'A simple room'
      "This is one simple room"

      doEnter() {
      say("Hello");
      }
      ;

      Where I am running into problems is the function doEnter() ... I have
      { set to indent 4, ; to outdent 4, and } to outdent 4.

      The ; needs to outdent 4 because it ends a definition, such as
      'clearing' in this case. But it also ends portions of other items such
      as commands 'say("Hello");' ...

      Can anyone offer a method to make this work correctly? So far for
      indenting this is what I have:

      !if &sin "d" .fhook-tads.setup
      ; define indentation scheme
      0 indent .hilight.tads 1 10

      indent .hilight.tads n ":" 4
      indent .hilight.tads o ";" -4
      indent .hilight.tads n "{" 4
      indent .hilight.tads o "}" -4
      indent .hilight.tads n "\\[" 4
      indent .hilight.tads o "\\]" -4
      indent .hilight.tads b "(" ")"
      indent .hilight.tads e "\"" "\"" "\\"
      indent .hilight.tads e "'" "'" "\\"
      !endif

      Thanks!

      Jeremy
    • Show all 4 messages in this topic