title: Sublime Text 3 custom syntax for cottle: hard to start
body: <p>I'm trying to make a &quot;very simple&quot; syntax highlight for &quot;cottle&quot; (which is a script language used in a text-to-speech app dedicated to Elite:Dangerous).
  All i want (at least at the beginning) is to have three different colours: Comments, &quot;non-strings&quot;, and strings.</p>
  <p>I started trying with the ST3 wiki, youtube tutorials, questions here.... but i can't sort out how to do it, 'cause the way the language work.
  I'll try to show you an example</p>
  <pre><code>{ everything_between_a_pair_of_brackets_is_code }
  everything outside all pairs of bracket is a string {_ and this is a comment. It begins with &quot;_&quot; and ends at the closing bracket }
  { This_is_code(&quot;but this is a string&quot;)
    This_is_still_code(&quot;this is also a string {but_this_is_code(\&quot;and a string\&quot;)} and this the end of the string&quot;)
  }
  </code></pre>
  <p>My problem is how to define this kind of &quot;nidification&quot; in my <strong>cottle.sublime-syntax</strong> file. I managed to get the comment, but only the first one.</p>
  <hr />
  <p><strong>- EDIT -</strong></p>
  <hr />
  <p>This is a real script:</p>
  <pre><code>{event.item} 
  {if event.repairedfully:
      fully repaired
  |else:
      partially repaired 
      {Occasionally(2,
          cat(
              OneOf(&quot;to &quot;, &quot;at &quot;),
              Humanise(event.health * 100),
              &quot; percent functionality&quot;
          )
      )}
  }
  
  {Occasionally(2, 
      cat(OneOf(&quot;, &quot;, &quot;and is&quot;), &quot; ready for re-activation&quot;)
  )}.
  </code></pre>
  <p>The output of this script could be &quot;<em>Engine module fully repaired.</em>&quot; or &quot;<em>Engine module partially repaired, and is ready for re-activation.</em>&quot;</p>
  <p>Please note the last dot of the phrase, which in the code is after the last bracket.</p>
  <p>This is another sample, with strings passed to functions inside other strings:</p>
  <pre><code>{OneOf(&quot;{ShipName()} has&quot;, &quot;&quot;)} 
  {OneOf(&quot;left supercruise&quot;, &quot;{OneOf(\&quot;entered\&quot;, \&quot;returned to\&quot;, \&quot;dropped to\&quot;)} normal space&quot;)}
  </code></pre>
  <p>My question is:
  how sublime-syntax files handle this kind of nidification?</p>