use of org.finos.legend.engine.language.pure.grammar.from.PureGrammarParserUtility in project legend-engine by finos.
the class DomainParseTreeWalker method visitProfile.
// ----------------------------------------------- PROFILE -----------------------------------------------
private Profile visitProfile(DomainParserGrammar.ProfileContext ctx) {
Profile profile = new Profile();
profile.name = PureGrammarParserUtility.fromIdentifier(ctx.qualifiedName().identifier());
profile._package = ctx.qualifiedName().packagePath() == null ? "" : PureGrammarParserUtility.fromPath(ctx.qualifiedName().packagePath().identifier());
profile.stereotypes = ctx.stereotypeDefinitions() == null ? Lists.mutable.empty() : ListIterate.collect(ctx.stereotypeDefinitions().identifier(), PureGrammarParserUtility::fromIdentifier);
profile.tags = ctx.tagDefinitions() == null ? Lists.mutable.empty() : ListIterate.collect(ctx.tagDefinitions().identifier(), PureGrammarParserUtility::fromIdentifier);
profile.sourceInformation = this.walkerSourceInformation.getSourceInformation(ctx);
return profile;
}
Aggregations