Interprets the specified string.
(String macro)
| 89 | |
| 90 | /** Interprets the specified string. */ |
| 91 | public void run(String macro) { |
| 92 | if (additionalFunctions!=null) { |
| 93 | if (!(macro.endsWith("\n")|| additionalFunctions.startsWith("\n"))) |
| 94 | macro = macro + "\n" + additionalFunctions; |
| 95 | else |
| 96 | macro = macro + additionalFunctions; |
| 97 | } |
| 98 | IJ.resetEscape(); |
| 99 | Tokenizer tok = new Tokenizer(); |
| 100 | Program pgm = tok.tokenize(macro); |
| 101 | if (pgm.hasVars && pgm.hasFunctions) |
| 102 | saveGlobals2(pgm); |
| 103 | run(pgm); |
| 104 | } |
| 105 | |
| 106 | /** Runs the specified macro, passing it a string |
| 107 | * argument and returning a string value. |
no test coverage detected