Reference

Class

RiTa

Name

evaluate

Description Parses and executes a RiScript string
Example
RiTa.evaluate("He was (happy | sad | indifferent)");
RiTa.evaluate("He was (happy | sad | \$emo)", context);
Parameters
Stringthe input
Object
(or Map in Java)
the context for any referenced variables or functions (optional)
Object
(or Map in Java)
(optional) options

{boolean} options.trace:
if true, output parser log to console (default=false)

{boolean} options.silent:
if true, supress warnings in console (default=false)

{boolean} options.traceLex:
if true, output lexer log to console (default=false)

Returns
Stringthe result of the evaluation
Syntax
RiTa.evaluate(string);
RiTa.evaluate(string, context);
Platform Java / JavaScript