src/operator.cpp
/*!
 * \fn int precedence(OperatorName op)
 * \param the name of an operator
 * \brief returns the precedence group of an operator
 * 
 * For any valid operator name, this function returns the precedence group 
 * of the operator.
 * This is a value between 1 and 15 with 1 being the operator of highest 
 * precedence and 15 of lowest precedence.
 */
\fn int precedence(OperatorName op)
\param the name of an operator
\brief returns the precedence group of an operator

For any valid operator name, this function returns the precedence group
of the operator.
This is a value between 1 and 15 with 1 being the operator of highest
precedence and 15 of lowest precedence.
\ fn int precedence ( OperatorName op ) \ param the name of an operator \ brief returns the precedence group of an operator For any valid operator name this function returns the precedence group of the operator . This is a value between 1 and 15 with 1 being the operator of highest precedence and 15 of lowest precedence .
int precedence(OperatorName op)
{
  if (op == ScopeResolutionOperator)
    return 1;
  else if (PostIncrementOperator <= op && op <= MemberAccessOperator)
    return 2;
  else if (PreIncrementOperator <= op && op <= BitwiseNot)
    return 3;
  else if (MultiplicationOperator <= op && op <= RemainderOperator)
    return 4;
  else if (AdditionOperator == op || op == SubstractionOperator)
    return 5;
  else if (LeftShiftOperator == op || op == RightShiftOperator)
    return 6;
  else if (LessOperator <= op && op <= GreaterEqualOperator)
    return 7;
  else if (EqualOperator == op || op == InequalOperator)
    return 8;
  else if (op == BitwiseAndOperator)
    return 9;
  else if (op == BitwiseXorOperator)
    return 10;
  else if (op == BitwiseOrOperator)
    return 11;
  else if (op == LogicalAndOperator)
    return 12;
  else if (op == LogicalOrOperator)
    return 13;
  else if (ConditionalOperator <= op && op <= BitwiseXorAssignmentOperator)
    return 14;
  else if (op == CommaOperator)
    return 15;
  return 0;
}
int precedence ( OperatorName op ) { if ( op == ScopeResolutionOperator ) return 1 ; else if ( PostIncrementOperator <= op && op <= MemberAccessOperator ) return 2 ; else if ( PreIncrementOperator <= op && op <= BitwiseNot ) return 3 ; else if ( MultiplicationOperator <= op && op <= RemainderOperator ) return 4 ; else if ( AdditionOperator == op || op == SubstractionOperator ) return 5 ; else if ( LeftShiftOperator == op || op == RightShiftOperator ) return 6 ; else if ( LessOperator <= op && op <= GreaterEqualOperator ) return 7 ; else if ( EqualOperator == op || op == InequalOperator ) return 8 ; else if ( op == BitwiseAndOperator ) return 9 ; else if ( op == BitwiseXorOperator ) return 10 ; else if ( op == BitwiseOrOperator ) return 11 ; else if ( op == LogicalAndOperator ) return 12 ; else if ( op == LogicalOrOperator ) return 13 ; else if ( ConditionalOperator <= op && op <= BitwiseXorAssignmentOperator ) return 14 ; else if ( op == CommaOperator ) return 15 ; return 0 ; }
\fn int precedence(OperatorName op)
 \param the name of an operator
 \brief returns the precedence group of an operator
\ fn int precedence ( OperatorName op ) \ param the name of an operator \ brief returns the precedence group of an operator