Search in sources :

Example 1 with PureGrammarParserUtility

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;
}
Also used : PureGrammarParserUtility(org.finos.legend.engine.language.pure.grammar.from.PureGrammarParserUtility) Profile(org.finos.legend.engine.protocol.pure.v1.model.packageableElement.domain.Profile)

Aggregations

PureGrammarParserUtility (org.finos.legend.engine.language.pure.grammar.from.PureGrammarParserUtility)1 Profile (org.finos.legend.engine.protocol.pure.v1.model.packageableElement.domain.Profile)1