macros
Class STRINGIFY
java.lang.Object
|
+--jatha.Macro
|
+--macros.STRINGIFY
- public class STRINGIFY
- extends Macro
STRINGIFY(expr)
This macro makes dynamically generated strings a little easier to read.
By default, the entire argument to STRINGIFY is wrapped in quotes. However,
if a backquote (`) is found, the runtime value of the backquoted expression
is inserted into the string. You can either backquote an identifier or an
expression enclosed in parentheses.
Example:
@STRINGIFY(x == `x; a(b)+c == `(a(b)+c);)
is equivalent to
"x == "+x+"; a(b)+c == "+(a(b)+c)+";"
Method Summary |
void |
expand(java.lang.String arg,
java.io.Writer out,
Expander expander)
Expands the macro |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
STRINGIFY
public STRINGIFY()
expand
public void expand(java.lang.String arg,
java.io.Writer out,
Expander expander)
throws java.io.IOException
- Expands the macro
- Overrides:
expand
in class Macro
- Following copied from class:
jatha.Macro
- Parameters:
arg
- The raw, unsplit argument to the macro.