/
DclInfo.sv
31 lines (24 loc) · 1.01 KB
/
DclInfo.sv
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
synthesized attribute lambdaId::Integer occurs on ValueDclInfo;
synthesized attribute lambdaParamIndex::Integer occurs on ValueDclInfo;
aspect default production
top::ValueDclInfo ::=
{
top.lambdaId = error("Should only be demanded on lambda params");
top.lambdaParamIndex = error("Should only be demanded on lambda params");
}
abstract production lambdaParamDcl
top::ValueDclInfo ::= fn::String ty::Type id::Integer paramIndex::Integer
{
top.fullName = fn;
propagate isEqual;
top.typeScheme = monoType(ty);
top.lambdaParamIndex = paramIndex;
top.lambdaId = id;
top.refDispatcher = lambdaParamReference;
top.defDispatcher = errorValueDef; -- should be impossible (never in scope at production level?)
top.defLHSDispatcher = errorDefLHS; -- ditto
top.transDefLHSDispatcher = errorTransAttrDefLHS;
}
fun lambdaParamDef
Def ::= sg::String sl::Location fn::String ty::Type id::Integer paramIndex::Integer =
valueDef(defaultEnvItem(lambdaParamDcl(fn,ty,id,paramIndex,sourceGrammar=sg,sourceLocation=sl)));