*
* @param context Context.
*/
TypeResolveListener(final AniContext context) {
this.context = context;
}
@Override
public void enterStructBodyMember(final AniParser.StructBodyMemberContext rule) {
final String raw = new RuleType(rule.type()).raw();
// @checkstyle MethodBodyCommentsCheck (10 lines)
// TODO remove all String scopes and replace them by Objects
// #118
// in this example we can't just replace it by the object since the string is used to be
// compared and the object generates the String every time it needs it.
// A cache type scope must be implemented to avoid multiple calculation of the same value.
final String scope = new FormattedScope(
new ListParents(
rule.variableDeclaratorId(),
118
in this example we can't just replace it by the object since the string is used to be
compared and the object generates the String every time it needs it.
A cache type scope must be implemented to avoid multiple calculation of the same value.
https://github.com/ani-lang/anilang-core/blob/d80750d73eec828c53f86f590a8fdb890d74473c/anilang-context/src/main/java/com/anilang/context/analysis/TypeResolveListener.java#L44