Skip to content

Commit

Permalink
ParentTypes: language fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
generalmimon committed Apr 15, 2024
1 parent 012a6d2 commit aa58a1a
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import io.kaitai.struct.format._
import io.kaitai.struct.translators.TypeDetector

/**
* Pass that calculates actual parent types of KSY-defined types (the type of
* the `parent` key).
* Precompile step that calculates actual parent types of KSY-defined types
* (the type of the `_parent` built-in property).
*/
class ParentTypes(classSpecs: ClassSpecs) {
def run(): Unit = {
Expand Down Expand Up @@ -97,9 +97,9 @@ class ParentTypes(classSpecs: ClassSpecs) {
}

/**
* If parent of `child` is not calculated yet, makes `parent` to be a parent type.
* Otherwise, if `parent` is different from existing parent, replaces parent type
* to the most generic kaitai type for user types.
* If parent of `child` is not calculated yet, makes `parent` the parent
* type. Otherwise, if `parent` is different from existing parent, replaces
* parent type with the most generic KS type for user types.
*/
def markupParentAs(parent: ClassSpec, child: ClassSpec): Unit = {
// Don't allow type usages across spec boundaries to affect parent resolution
Expand Down

0 comments on commit aa58a1a

Please sign in to comment.