Reference

Class

RiGrammar

Name

expandWith

Description Expands the grammar after replacing an instance of the non-terminal 'symbol' with the String in 'literal'.
 
Guarantees that 'literal' will be in the final expanded String, assuming at least one instance of 'symbol' in the Grammar.
Syntax
expandWith(literal, symbol);
expandWith(literal, symbol, callbackObject);
Parameters
Stringa literal
Stringa symbol
Objectthe object on which to call any (back-ticked) callback functions (optional)
Returns
Stringthe result of the expansion
Platform Java / Javascript