anchor.diff:      conditions(Rest, add_pos(Pos,1), Parsed);
   conditions(<<SP:1/binary,Rest/binary>>, Pos, Parsed) when ?IS_NEWLINE(SP) ->
       conditions(Rest, new_line(Pos), Parsed);
  +conditions(<<"(",Rest/binary>>, {0,Row,Col}, Parsed) ->
  +    conditions(Rest, {1,Row,Col+1}, Parsed);
   conditions(<<"(",Rest/binary>>, {Level,Row,Col}, Parsed) ->
       conditions(Rest, {Level+1,Row,Col+1}, add_op(open, Parsed));
   conditions(<<")",Rest/binary>>, {1,_Row,_Col}=Pos, Parsed) ->
  -    {Rest, normal_level(add_pos(Pos,1)), add_op(close, Parsed)};
  +    {Rest, normal_level(add_pos(Pos,1)), add_op('end', Parsed)};
   conditions(<<")",Rest/binary>>, {Level,Row,Col}, Parsed) ->
       conditions(Rest, {Level-1,Row,Col+1}, add_op(close, Parsed));
   conditions(<<"$",Rest/binary>>, Pos, Parsed) ->
  -    {Rest0, Pos0, Var} = variable(Rest, varname_level(add_pos(Pos,1)), []),
  +    {Rest0, Pos0, [Var]} = variable(Rest, add_pos(Pos,1), []),
       conditions(Rest0, Pos0, add_op(Var, Parsed));
   conditions(<<Op:3/binary,Rest/binary>>, Pos, Parsed) when ?IS_OP3(Op) ->
  -    conditions(Rest, add_pos(Pos,3), add_op(Op, Parsed));
  +    conditions(Rest, add_pos(Pos,3), add_op({Op,precedence(Op)}, Parsed));
   conditions(<<Op:2/binary,Rest/binary>>, Pos, Parsed) when ?IS_OP2(Op) ->
  -    conditions(Rest, add_pos(Pos,2), add_op(Op, Parsed));
  +    conditions(Rest, add_pos(Pos,2), add_op({Op,precedence(Op)}, Parsed));
   conditions(<<Op:1/binary,Rest/binary>>, Pos, Parsed) when ?IS_OP1(Op) ->
  -    conditions(Rest, add_pos(Pos,1), add_op(Op, Parsed));
  +    conditions(Rest, add_pos(Pos,1), add_op({Op,precedence(Op)}, Parsed));
   conditions(<<A:8,_/binary>> = Rest, Pos, Parsed) when ?IS_NUMBER(A) ->
       {Rest0, Pos0, [Number]} = number(Rest, Pos, []),
       conditions(Rest0, Pos0, add_op(Number, Parsed));
  
positive.code: code(<<";",Rest/binary>>, {code_statement,_,_}=Pos, Parsed) ->
      {Rest, normal_level(add_pos(Pos,1)), Parsed};
  code(<<I:8,F:8,SP:8,Rest/binary>>, Pos, Parsed)
          when (I =:= $i orelse I =:= $I)
          andalso (F =:= $f orelse F =:= $F)
          andalso (SP =:= 32 orelse SP =:= $() ->
      st_if(<<SP:8,Rest/binary>>, Pos, Parsed);
  code(<<E:8,L:8,S:8,E:8,SP:8,Rest/binary>>,
       Pos, [#st_if{}|_]=Parsed)
          when (E =:= $e orelse E =:= $E)
          andalso (L =:= $l orelse L =:= $L)
          andalso (S =:= $s orelse S =:= $S)
          andalso (SP =:= 32 orelse SP =:= ${ orelse SP =:= $i orelse SP =:= $I) ->
      st_else(<<SP:8,Rest/binary>>, Pos, Parsed);
  code(<<"?>",Rest/binary>>, {code_value,_,_}=Pos, Parsed) ->
      {Rest, normal_level(add_pos(Pos,2)), Parsed};
  
negative.code: code_block_level({_,Row,Col}) -> {code_block,Row,Col}.
  code_value_level({_,Row,Col}) -> {code_value,Row,Col}.
  code_statement_level({_,Row,Col}) -> {code_statement,Row,Col}.
  
  % TODO: change this implementation for calculate operations
  add_op('end', [{op,Content}|Parsed]) ->
      [{op,lists:reverse(Content)}|Parsed];
  add_op(Add, [{op,Content}|Parsed]) ->
      [{op,[Add|Content]}|Parsed];
  add_op(Add, Parsed) ->
      [{op,[Add]}|Parsed].
  
  %% took from http://php.net/manual/en/language.operators.precedence.php
  
  -type associativity() :: no_assoc | left | right.
  -spec precedence(binary()) -> {associativity(), pos_integer()} | false.
  
  precedence(<<"clone">>) -> {no_assoc, 1};
  precedence(<<"new">>) -> {no_assoc, 1};
  precedence(<<"[">>) -> {left, 2}; %% array
  precedence(<<"**">>) -> {right, 3}; %% arith
  precedence(<<"++">>) -> {right, 4};
  precedence(<<"--">>) -> {right, 4};
  precedence(<<126>>) -> {right, 4}; %% ~ (types and increment/decrement)
  precedence(<<"(int)">>) -> {right, 4};
  precedence(<<"(float)">>) -> {right, 4};
  precedence(<<"(string)">>) -> {right, 4};
  precedence(<<"(array)">>) -> {right, 4};
  precedence(<<"(object)">>) -> {right, 4};
  precedence(<<"(bool)">>) -> {right, 4};
  precedence(<<"@">>) -> {right, 4};
  precedence(<<"instaceof">>) -> {no_assoc, 5};
  precedence(<<"!">>) -> {right, 6}; %% logic
  precedence(<<"*">>) -> {left, 7};
  precedence(<<"/">>) -> {left, 7};
  precedence(<<"%">>) -> {left, 7};
  precedence(<<"+">>) -> {left, 8};
  precedence(<<"-">>) -> {left, 8};
  precedence(<<".">>) -> {left, 8}; %% concat
  precedence(<<"<<">>) -> {left, 9}; %% bit by bit
  precedence(<<">>">>) -> {left, 9}; %% bit by bit
  precedence(<<"<">>) -> {no_assoc, 10};
  precedence(<<"<=">>) -> {no_assoc, 10};
  precedence(<<">">>) -> {no_assoc, 10};
  precedence(<<">=">>) -> {no_assoc, 10};
  precedence(<<"==">>) -> {no_assoc, 11};
  precedence(<<"!=">>) -> {no_assoc, 11};
  precedence(<<"===">>) -> {no_assoc, 11};
  precedence(<<"!==">>) -> {no_assoc, 11};
  precedence(<<"<>">>) -> {no_assoc, 11};
  precedence(<<"<=>">>) -> {no_assoc, 11};
  precedence(<<"&">>) -> {left, 12}; %% bit by bit & references
  precedence(<<"^">>) -> {left, 13}; %% bit by bit
  precedence(<<"|">>) -> {left, 14}; %% bit by bit
  precedence(<<"&&">>) -> {left, 15}; %% logic
  precedence(<<"||">>) -> {left, 16}; %% logic
  precedence(<<"??">>) -> {right, 17}; %% comparison
  precedence(<<"?:">>) -> {left, 18}; %% ternary
  precedence(<<"=">>) -> {right, 19}; %% assign
  precedence(<<"+=">>) -> {right, 19};
  precedence(<<"-=">>) -> {right, 19};
  precedence(<<"*=">>) -> {right, 19};
  precedence(<<"**=">>) -> {right, 19};
  precedence(<<"/=">>) -> {right, 19};
  precedence(<<".=">>) -> {right, 19};
  precedence(<<"%=">>) -> {right, 19};
  precedence(<<"&=">>) -> {right, 19};
  precedence(<<"|=">>) -> {right, 19};
  precedence(<<"^=">>) -> {right, 19};
  precedence(<<"<<=">>) -> {right, 19};
  precedence(<<">>=">>) -> {right, 19};
  precedence(<<"and">>) -> {left, 20};
  precedence(<<"xor">>) -> {left, 21};
  precedence(<<"or">>) -> {left, 22};
  precedence(_) -> false.
  