X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=Tools%2FSource%2FMigrationTools%2Forg%2Ftianocore%2Fmigration%2FMacro.java;h=bd10b5a251b80129730d89c06d4bef2966f422f0;hb=ce32083fca6d876a3d0d0339d2ae2dd40e40d02e;hp=615dda06a1a1f435715bffa12230aae50fa81e6d;hpb=050e979f683e64d9d747a9ea49bb3deee0dd9ae5;p=mirror_edk2.git diff --git a/Tools/Source/MigrationTools/org/tianocore/migration/Macro.java b/Tools/Source/MigrationTools/org/tianocore/migration/Macro.java index 615dda06a1..bd10b5a251 100644 --- a/Tools/Source/MigrationTools/org/tianocore/migration/Macro.java +++ b/Tools/Source/MigrationTools/org/tianocore/migration/Macro.java @@ -15,32 +15,33 @@ package org.tianocore.migration; import java.util.regex.*; public class Macro { - Macro(String r8, String r9) { - r8name = r8; - r9name = r9; - } - Macro(String[] linecontext) { - r8name = linecontext[0]; - r9name = linecontext[1]; - } - - public String r8name; - public String r9name; + Macro(String r8, String r9) { + r8name = r8; + r9name = r9; + } + Macro(String[] linecontext) { + r8name = linecontext[0]; + r9name = linecontext[1]; + } + + public String r8name; + public String r9name; - public static Pattern ptntmacro = Pattern.compile("\\b[A-Z_]+\\s*?\\(?\\b",Pattern.MULTILINE); + public static Pattern ptntmacro = Pattern.compile("\\b[A-Z_]+\\s*?\\(?\\b",Pattern.MULTILINE); - private static String unmacro = "VOID UINTN BOOLEAN ASSERT OPTIONAL STATIC NULL TRUE IN OUT FALSE"; + private static String unmacro = "VOID UINTN BOOLEAN ASSERT OPTIONAL STATIC NULL TRUE IN OUT FALSE"; - public static String register(Matcher mtr, ModuleInfo mi, Database db) { - String temp = null; - - temp = mtr.group(); - if (ModuleInfo.db.hasMacro(temp)) { // only changed macros registered, because the database of macro has only changed ones - if (!unmacro.contains(temp)) { - mi.hashnonlocalmacro.add(temp); - } - return temp; - } - return null; - } + public static String register(Matcher mtr, ModuleInfo mi, Database db) { + String temp = null; + + temp = mtr.group(); + mi.hashmacro.add(temp); + if (MigrationTool.db.hasMacro(temp)) { // only changed macros registered, because the database of macro has only changed ones + if (!unmacro.contains(temp)) { + mi.hashnonlocalmacro.add(temp); + } + return temp; + } + return null; + } } \ No newline at end of file