MCPcopy Create free account
hub / github.com/AstroImageJ/astroimagej / lookupWord

Method lookupWord

ij/src/main/java/ij/macro/Program.java:116–127  ·  view source on GitHub ↗

Looks up a word in the symbol table. Returns null if the word is not found.

(String str)

Source from the content-addressed store, hash-verified

114
115 /** Looks up a word in the symbol table. Returns null if the word is not found. */
116 Symbol lookupWord(String str) {
117 Symbol symbol;
118 String symStr;
119 for (int i=0; i<=stLoc; i++) {
120 symbol = table[i];
121 if (symbol.type!=STRING_CONSTANT && str.equals(symbol.str)) {
122 symTabLoc = i;
123 return symbol;
124 }
125 }
126 return null;
127 }
128
129 void saveGlobals(Interpreter interp) {
130 if (interp.topOfStack==-1)

Callers 1

addTokenMethod · 0.80

Calls 1

equalsMethod · 0.45

Tested by

no test coverage detected