Interprets the specified tokenized macro starting at the specified location.
(Program pgm, int macroLoc, String macroName)
| 184 | |
| 185 | /** Interprets the specified tokenized macro starting at the specified location. */ |
| 186 | public void runMacro(Program pgm, int macroLoc, String macroName) { |
| 187 | calledMacro = true; |
| 188 | this.pgm = pgm; |
| 189 | this.macroName = macroName; |
| 190 | pc = macroLoc-1; |
| 191 | previousInstance = instance; |
| 192 | instance = this; |
| 193 | pushGlobals(); |
| 194 | if (func==null) |
| 195 | func = new Functions(this, pgm); |
| 196 | func.plot = null; |
| 197 | if (macroLoc==0) |
| 198 | doStatements(); |
| 199 | else |
| 200 | doBlock(); |
| 201 | finishUp(); |
| 202 | Recorder.recordInMacros = false; |
| 203 | } |
| 204 | |
| 205 | /** Runs Process/Batch/ macros. */ |
| 206 | public ImagePlus runBatchMacro(String macro, ImagePlus imp) { |
no test coverage detected