Skip to content

Commit

Permalink
adding comments from todays code review
Browse files Browse the repository at this point in the history
  • Loading branch information
cmnrd committed Jul 29, 2021
1 parent ab8e914 commit 85c94a4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions org.lflang/src/org/lflang/generator/LFGenerator.java
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,9 @@ private GeneratorBase createGenerator(Target target, FileConfig fileConfig,
case Python: {
return new PythonGenerator(fileConfig, errorReporter);
}
// FIXME: make case exhaustive
default: {
// FIXME: rename createKotlinBaseGenerator
return createKotlinGenerator(target, fileConfig, errorReporter);
}
}
Expand All @@ -158,6 +160,7 @@ private GeneratorBase createKotlinGenerator(Target target, FileConfig fileConfig
// class up at runtime and instantiate it if found.
String packageName = getPackageName(target);
String classNamePrefix = getClassNamePrefix(target);
// FIXME: make the above attributes of the target
try {
return (GeneratorBase) Class
.forName("org.lflang.generator." + packageName + "." + classNamePrefix + "Generator")
Expand All @@ -179,6 +182,7 @@ private GeneratorBase createKotlinGenerator(Target target, FileConfig fileConfig
+ "broken, preventing us from loading the generator"
+ "properly. Please consider building the RCA via Maven.");
// FIXME: Add a link to the wiki with more information.
// FIXME: really do above
return null;
}
}
Expand Down
2 changes: 1 addition & 1 deletion org.lflang/src/org/lflang/generator/cpp/CppExtensions.kt
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ val TriggerRef.name: String
/** Return a comment to be inserted at the top of generated files. */
fun fileComment(r: Resource) = """
/*
* This file was autogenerated by the Lingua Franca Compiler
* This file was autogenerated by the Lingua Franca Compiler.
*
* Source: ${r.uri}
* Date: ${LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"))}
Expand Down

2 comments on commit 85c94a4

@hokeun
Copy link
Member

@hokeun hokeun commented on 85c94a4 Jul 29, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, Christian!
I should be able to address these comments by the end of today in pacific time.

@lhstrh
Copy link
Member

@lhstrh lhstrh commented on 85c94a4 Jul 29, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hokeun: easiest if you push updates to this branch directly.

Please sign in to comment.