Module-specific val name transform, containing logic to prevent from recursing into inner classes and applies the naming transform on inner functions.
Method-specific val name transform, handling the return case.
Base transformer that provides the val name transform.
Base transformer that provides the val name transform. Should not be instantiated, since by default this will recurse everywhere and break the naming context variable bounds.
Applies naming transforms to vals in the annotated module or method.
Applies naming transforms to vals in the annotated module or method.
For methods, a hierarchical naming transform is used, where it will try to give objects names based on the call stack, assuming all functions on the stack are annotated as such and return a non-AnyVal object. Does not recurse into inner functions.
For modules, this serves as the root of the call stack hierarchy for naming purposes. Methods will have chiselName annotations (non-recursively), but this does NOT affect inner classes.
Basically rewrites all instances of: val name = expr to: val name = context.name(expr, name)
Applies the val name transform to a class body.
Applies the val name transform to a class body. Closes context on top level or return local context to englobing context. Closing context only makes sense when top level a Module. A Module is always the naming top level. Transformed classes can be either Module or standard class.
Applies the val name transform to a method body, doing additional bookkeeping with the context to allow names to propagate and prefix through the function call stack.