466 log.print(Level.FINE, () -> "Process tree " + tree.name());
467 tree.accept(this, tree.isPreprocessing() ? null : headerFile.dictionary().lookup(tree.type()));
468 } catch (Exception ex) {
469 handleException(ex);
470 log.print(Level.WARNING, () -> "Tree causing above exception is: " + tree.name());
471 log.print(Level.WARNING, () -> tree.toString());
472 }
473 return this;
474 }
475
476 @Override
477 public Boolean visitMacro(MacroTree macroTree, JType jt) {
478 if (!macroTree.isConstant()) {
479 log.print(Level.FINE, () -> "Skipping unrecognized object-like macro " + macroTree.name());
480 return false;
481 }
482 String name = macroTree.name();
483 MacroParser.Macro macro = macroTree.macro().get();
484 log.print(Level.FINE, () -> "Adding macro " + name);
485
486 addConstant(global_cw, macroTree.location(), name, macro.type(), macro.value());
487
488 return true;
489 }
490 }
|
466 log.print(Level.FINE, () -> "Process tree " + tree.name());
467 tree.accept(this, tree.isPreprocessing() ? null : headerFile.dictionary().lookup(tree.type()));
468 } catch (Exception ex) {
469 handleException(ex);
470 log.print(Level.WARNING, () -> "Tree causing above exception is: " + tree.name());
471 log.print(Level.WARNING, () -> tree.toString());
472 }
473 return this;
474 }
475
476 @Override
477 public Boolean visitMacro(MacroTree macroTree, JType jt) {
478 if (!macroTree.isConstant()) {
479 log.print(Level.FINE, () -> "Skipping unrecognized object-like macro " + macroTree.name());
480 return false;
481 }
482 String name = macroTree.name();
483 MacroParser.Macro macro = macroTree.macro().get();
484 log.print(Level.FINE, () -> "Adding macro " + name);
485
486 addConstant(global_cw, macroTree.location(), Utils.toMacroName(name), macro.type(), macro.value());
487
488 return true;
489 }
490 }
|