veryl
veryl copied to clipboard
Refactor `Expression` and `TypeExpression`
Now type parameter overriding by built-in types is syntax error.
module ModuleA {
inst u: ModuleB #(
p: logic,
);
}
This is because InstParameterItem
can take Expression
only.
InstParameterItem: Identifier [ Colon Expression ];
If we simply add TypeExpression
to it, syntax ambiguous occurs because both Expression
and TypeExpression
can reach ScopedIdentifier
.
InstParameterItem: Identifier [ Colon ( Expression | TypeExpression ) ];
So I think this case requires to refactor whole Expression
and TypeExpression
.
Refer: #958