private void processArgument ( ) { final StringBuilder argumentBuilder = new StringBuilder ( ) ; while ( templateReader . hasNextCharacter ( ) ) { final char argumentCharacter = templateReader . nextCharacter ( ) ; if ( argumentCharacter == syntax . getArgumentClosing ( ) ) { final String argument = argumentBuilder . toString ( ) . trim ( ) ; // Getting actual argument name. if ( Strings . startsWith ( argument , syntax . getEquationMarker ( ) ) ) { // Starts with an equation sign. Evaluating. final String equation = LmlUtilities . stripMarker ( argument ) ; templateReader . append ( newEquation ( ) . getResult ( equation ) , equation + " equation" ) ; } else if ( Strings . startsWith ( argument , syntax . getConditionMarker ( ) ) ) { // Condition/ternary operator. Evaluating. processConditionArgument ( argument , argumentBuilder ) ; } else { // Regular argument. Looking for value mapped to the selected key. templateReader . append ( Nullables . toString ( data . getArgument ( argument ) ) , argument + " argument" ) ; } return ; } argumentBuilder . append ( argumentCharacter ) ; } }
Found an argument opening sign . Have to find argument s name and replace it in the template .