tweaks per Sam's comment. define default version so targets don't fail to compile.
This commit is contained in:
parent
db0830e00d
commit
0b8a70a2a4
|
@ -90,7 +90,7 @@ public class Tool {
|
|||
public static final String VERSION;
|
||||
static {
|
||||
String version = Tool.class.getPackage().getImplementationVersion();
|
||||
VERSION = version != null ? version : "4.2";
|
||||
VERSION = version != null ? version : "4.3";
|
||||
}
|
||||
|
||||
public static final String GRAMMAR_EXTENSION = ".g4";
|
||||
|
|
|
@ -92,15 +92,15 @@ public abstract class Target {
|
|||
* For now, a simple string match used on x.y of x.y.z scheme. We use a method to avoid mismatches
|
||||
* between a template called VERSION. This value is checked against Tool.VERSION during load of templates.
|
||||
*/
|
||||
public abstract String getVersion();
|
||||
public String getVersion() { return "4.3"; }
|
||||
|
||||
public STGroup getTemplates() {
|
||||
if (templates == null) {
|
||||
templates = loadTemplates();
|
||||
String version = getVersion();
|
||||
if (version == null || !version.equals(Tool.VERSION)) {
|
||||
gen.tool.errMgr.toolError(ErrorType.INCOMPATIBLE_TOOL_AND_TEMPLATES, version, Tool.VERSION, language);
|
||||
}
|
||||
templates = loadTemplates();
|
||||
}
|
||||
|
||||
return templates;
|
||||
|
|
Loading…
Reference in New Issue