Skip to content

Commit

Permalink
fix: Modifier parsing not recognizing certain modifiers
Browse files Browse the repository at this point in the history
  • Loading branch information
Col-E committed Jan 5, 2021
1 parent ce2a6aa commit f64c779
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import me.coley.recaf.parse.bytecode.*;
import me.coley.recaf.parse.bytecode.ast.*;
import me.coley.recaf.parse.bytecode.exception.ASTParseException;
import me.coley.recaf.util.AccessFlag;

import java.util.*;
import java.util.stream.Collectors;
Expand All @@ -13,10 +14,9 @@
* @author Matt
*/
public class ModifierParser extends AbstractParser<DefinitionModifierAST> {
private static final List<String> ALLOWED_NAMES = Arrays.asList(
"public", "private", "protected",
"static", "final", "synchronized", "varargs", "native", "abstract", "strictfp", "super", "enum",
"bridge", "synthetic");
private static final List<String> ALLOWED_NAMES = Arrays.stream(AccessFlag.values())
.map(AccessFlag::getName)
.collect(Collectors.toList());

@Override
public DefinitionModifierAST visit(int lineNo, String line) throws ASTParseException {
Expand Down

0 comments on commit f64c779

Please # to comment.