/** * Dependencies of a project. The real meat of it. */ private List<Id> dependencies(Token.Kind kind, boolean allowNullVersion) { indent(); if (match(kind, Token.Kind.COLON, Token.Kind.LBRACKET) == null) { return null; // no deps. } List<Id> deps = new ArrayList<Id>(); chewEols(); chewIndents(); // Slurp up the dep ids. Id id; while ((id = id(allowNullVersion)) != null) { // Optional additional params at the end. String classifier = classifier(); if (null != classifier) { id.setClassifier(classifier); } chewEols(); chewIndents(); deps.add(id); } if (match(Token.Kind.RBRACKET) == null) { // ERROR! parseException("Expected ]"); } return deps; }
/** * Dependencies of a project. The real meat of it. */ private List<Id> dependencies(Token.Kind kind, boolean allowNullVersion) { indent(); if (match(kind, Token.Kind.COLON, Token.Kind.LBRACKET) == null) { return null; // no deps. } List<Id> deps = new ArrayList<Id>(); chewEols(); chewIndents(); // Slurp up the dep ids. Id id; while ((id = id(allowNullVersion)) != null) { // Optional additional params at the end. String classifier = classifier(); if (null != classifier) { id.setClassifier(classifier); } chewEols(); chewIndents(); deps.add(id); } if (match(Token.Kind.RBRACKET) == null) { // ERROR! parseException("Expected ]"); } return deps; }
/** * Dependencies of a project. The real meat of it. */ private List<Id> dependencies(Token.Kind kind, boolean allowNullVersion) { indent(); if (match(kind, Token.Kind.COLON, Token.Kind.LBRACKET) == null) { return null; // no deps. } List<Id> deps = new ArrayList<Id>(); chewEols(); chewIndents(); // Slurp up the dep ids. Id id; while ((id = id(allowNullVersion)) != null) { // Optional additional params at the end. String classifier = classifier(); if (null != classifier) { id.setClassifier(classifier); } chewEols(); chewIndents(); deps.add(id); } if (match(Token.Kind.RBRACKET) == null) { // ERROR! parseException("Expected ]"); } return deps; }