Added support for sighash-style tuple parsing.

This commit is contained in:
Richard Moore 2019-11-20 18:26:59 +09:00
parent c35ddaf646
commit 19aaade9c6
No known key found for this signature in database
GPG Key ID: 665176BE8E9DC651

@ -87,7 +87,11 @@ function parseParamType(param: string, allowIndexed: boolean): ParseNode {
let c = param[i];
switch (c) {
case "(":
if (!node.state.allowParams) { throwError(i); }
if (node.state.allowType && node.type === "") {
node.type = "tuple";
} else if (!node.state.allowParams) {
throwError(i);
}
node.state.allowType = false;
node.type = verifyType(node.type);
node.components = [ newNode(node) ];