This interface specifies the method needed to implement a special print rule.
A special rule must implement the append method, which should
call pv.append to add data to the output. For example
Examples
CopyC#
pv.AddSpecialRule(Operator.OP_LIST,new PrintVisitor.IPrintRules()
{
public void Append(INode node, PrintVisitor pv) throws ParseException
{
pv.Append("[");
for(int i=0;i<node.JjtGetNumChildren();++i)
{
if(i>0) pv.Append(",");
node.JjtGetChild(i).JjtAccept(pv, null);
}
pv.append("]");
}});
Namespace:
SingularSys.Jep
Assembly:
Jep (in Jep.dll) Version: 1.1.0.0 (1.0.0)
Syntax
C# |
---|
public interface IPrintRules |
Visual Basic (Declaration) |
---|
Public Interface IPrintRules |
Visual C++ |
---|
public interface class IPrintRules |
See Also