private Id id(boolean allowNullVersion) { String groupId = idFragment(); if (groupId == null) { return null; } // Now expect a colon. if (match(Token.Kind.COLON) == null) { return null; } String artifactId = idFragment(); if (artifactId == null) { return null; } // Now expect a colon. String version; if (match(Token.Kind.COLON) == null && !allowNullVersion) { return null; } else { version = idFragment(); if (version == null && !allowNullVersion) { return null; } } return new Id(groupId, artifactId, StringUtils.isEmpty(version) ? null : version); }
private Property property() { String key = idFragment(); if (key == null) { return null; } // Now expect a colon. if (match(Token.Kind.COLON) == null) { return null; } List<Token> value = match(Kind.STRING); if (value == null) { return null; } String actual = stripQuotes(value.get(0).value); return new Property(key, actual); }
String prop = idFragment(); if (prop == null) parseException("Expected a property expression after ${");
private List<String> modules() { indent(); if (match(Token.Kind.MODULES, Token.Kind.COLON, Token.Kind.LBRACKET) == null) { return null; // no properties. } List<String> modules = new ArrayList<String>(); chewEols(); chewIndents(); String module; while ((module = idFragment()) != null) { chewEols(); chewIndents(); modules.add(module); } if (match(Token.Kind.RBRACKET) == null) { // ERROR! parseException("Expected ]"); } return modules; }
while ((propKey = match(Kind.IDENT, Kind.COLON)) != null) { String atom = idFragment();
private Id id(boolean allowNullVersion) { String groupId = idFragment(); if (groupId == null) { return null; } // Now expect a colon. if (match(Token.Kind.COLON) == null) { return null; } String artifactId = idFragment(); if (artifactId == null) { return null; } // Now expect a colon. String version; if (match(Token.Kind.COLON) == null && !allowNullVersion) { return null; } else { version = idFragment(); if (version == null && !allowNullVersion) { return null; } } return new Id(groupId, artifactId, StringUtils.isEmpty(version) ? null : version); }
private Id id(boolean allowNullVersion) { String groupId = idFragment(); if (groupId == null) { return null; } // Now expect a colon. if (match(Token.Kind.COLON) == null) { return null; } String artifactId = idFragment(); if (artifactId == null) { return null; } // Now expect a colon. String version; if (match(Token.Kind.COLON) == null && !allowNullVersion) { return null; } else { version = idFragment(); if (version == null && !allowNullVersion) { return null; } } return new Id(groupId, artifactId, StringUtils.isEmpty(version) ? null : version); }
private Property property() { String key = idFragment(); if (key == null) { return null; } // Now expect a colon. if (match(Token.Kind.COLON) == null) { return null; } List<Token> value = match(Kind.STRING); if (value == null) { return null; } String actual = stripQuotes(value.get(0).value); return new Property(key, actual); }
private Property property() { String key = idFragment(); if (key == null) { return null; } // Now expect a colon. if (match(Token.Kind.COLON) == null) { return null; } List<Token> value = match(Kind.STRING); if (value == null) { return null; } String actual = stripQuotes(value.get(0).value); return new Property(key, actual); }
String prop = idFragment(); if (prop == null) parseException("Expected a property expression after ${");
String prop = idFragment(); if (prop == null) parseException("Expected a property expression after ${");
private List<String> modules() { indent(); if (match(Token.Kind.MODULES, Token.Kind.COLON, Token.Kind.LBRACKET) == null) { return null; // no properties. } List<String> modules = new ArrayList<String>(); chewEols(); chewIndents(); String module; while ((module = idFragment()) != null) { chewEols(); chewIndents(); modules.add(module); } if (match(Token.Kind.RBRACKET) == null) { // ERROR! parseException("Expected ]"); } return modules; }
private List<String> modules() { indent(); if (match(Token.Kind.MODULES, Token.Kind.COLON, Token.Kind.LBRACKET) == null) { return null; // no properties. } List<String> modules = new ArrayList<String>(); chewEols(); chewIndents(); String module; while ((module = idFragment()) != null) { chewEols(); chewIndents(); modules.add(module); } if (match(Token.Kind.RBRACKET) == null) { // ERROR! parseException("Expected ]"); } return modules; }
while ((propKey = match(Kind.IDENT, Kind.COLON)) != null) { String atom = idFragment();
while ((propKey = match(Kind.IDENT, Kind.COLON)) != null) { String atom = idFragment();