Search in sources :

Example 1 with LambdaParamTypeContext

use of org.finos.legend.pure.m3.serialization.grammar.m3parser.antlr.M3Parser.LambdaParamTypeContext in project legend-pure by finos.

the class AntlrContextToM3CoreInstance method lambdaParam.

private VariableExpression lambdaParam(LambdaParamTypeContext ctx, IdentifierContext var, MutableList<String> typeParametersNames, String space, ImportGroup importId) {
    GenericType type = null;
    Multiplicity multiplicity = null;
    if (ctx != null) {
        type = this.type(ctx.type(), typeParametersNames, spacePlusTabs(space, 3), importId, false);
        multiplicity = this.buildMultiplicity(ctx.multiplicity().multiplicityArgument());
    }
    return VariableExpressionInstance.createPersistent(this.repository, this.sourceInformation.getPureSourceInformation(var.getStart()), type, multiplicity, var.getText());
}
Also used : GenericType(org.finos.legend.pure.m3.coreinstance.meta.pure.metamodel.type.generics.GenericType) Multiplicity(org.finos.legend.pure.m3.coreinstance.meta.pure.metamodel.multiplicity.Multiplicity)

Aggregations

Multiplicity (org.finos.legend.pure.m3.coreinstance.meta.pure.metamodel.multiplicity.Multiplicity)1 GenericType (org.finos.legend.pure.m3.coreinstance.meta.pure.metamodel.type.generics.GenericType)1