365 try {
366 log.print(Level.FINE, () -> "Process tree " + tree.name());
367 tree.accept(this, tree.isPreprocessing() ? null : headerFile.dictionary().lookup(tree.type()));
368 } catch (Exception ex) {
369 handleException(ex);
370 log.print(Level.WARNING, () -> "Tree causing above exception is: " + tree.name());
371 log.print(Level.WARNING, () -> tree.toString());
372 }
373 }
374
375 @Override
376 public Boolean visitMacro(MacroTree macroTree, JType jt) {
377 if (!macroTree.isConstant()) {
378 log.print(Level.FINE, () -> "Skipping unrecognized object-like macro " + macroTree.name());
379 return false;
380 }
381 String name = macroTree.name();
382 MacroParser.Macro macro = macroTree.macro().get();
383 log.print(Level.FINE, () -> "Adding macro " + name);
384
385 addConstant(global_jsb, macroTree.location(), name, macro.type(), macro.value());
386
387 return true;
388 }
389 }
|
365 try {
366 log.print(Level.FINE, () -> "Process tree " + tree.name());
367 tree.accept(this, tree.isPreprocessing() ? null : headerFile.dictionary().lookup(tree.type()));
368 } catch (Exception ex) {
369 handleException(ex);
370 log.print(Level.WARNING, () -> "Tree causing above exception is: " + tree.name());
371 log.print(Level.WARNING, () -> tree.toString());
372 }
373 }
374
375 @Override
376 public Boolean visitMacro(MacroTree macroTree, JType jt) {
377 if (!macroTree.isConstant()) {
378 log.print(Level.FINE, () -> "Skipping unrecognized object-like macro " + macroTree.name());
379 return false;
380 }
381 String name = macroTree.name();
382 MacroParser.Macro macro = macroTree.macro().get();
383 log.print(Level.FINE, () -> "Adding macro " + name);
384
385 addConstant(global_jsb, macroTree.location(), Utils.toMacroName(name), macro.type(), macro.value());
386
387 return true;
388 }
389 }
|