title: How to parse If-Else brackets
body: <p>In my C like Programming language I want the compiler to parse If-Else brackets. I have some code like: </p>
  
  <pre><code>if( varA == varB ) {
    if ( varB == varC ) {
     varA = 1;
    } else {
     varB = 1;
    }
  };
  </code></pre>
  
  <p>and want it to parse to this (fictional assembler):</p>
  
  <pre><code>compare varA with varB
  jump if equal to condition_2
  jump to else_condition2  ; gets only executed if statement above does not get executed -&gt; else
  
  label condition_2:
  compare varB with varC
  jump if equal to if_bracket_1
  jump to else_bracket_1
  
  label if_bracket_1:
  varA = 1;
  jump to back_label
  
  label else_bracket_1:
  varB = 1;
  jump to back_label 
  
  label else_condition2: 
  ; nothing, because there is no else
  
  label back_label:
  nop ; continue main program here
  </code></pre>
  
  <p>I know how to parse the conditions to jump-if-equal and so on, and I know the parsing method will be recursive .. but I do not have a clue how to implement this parsing method .. I do not need code, just an idea, how to manage this.</p>
  
  <p>Thanks for your help.</p>