summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorWilliam S Fulton <wsf@fultondesigns.co.uk>2022-11-25 08:29:01 +0000
committerWilliam S Fulton <wsf@fultondesigns.co.uk>2022-11-25 08:37:39 +0000
commit9b91b24d6be0c5296b08b527b70e6abd5507b3c2 (patch)
treeea0dcf037b6f17ea11f560c14105738df1258bd2 /Source
parent081d44d45ea4ef4247580a9baa1f8bb64bd16b77 (diff)
downloadswig-9b91b24d6be0c5296b08b527b70e6abd5507b3c2.tar.gz
Fix syntax error parsing unnamed template parameters with a default.
Closes #961
Diffstat (limited to 'Source')
-rw-r--r--Source/CParse/parser.y3
1 files changed, 2 insertions, 1 deletions
diff --git a/Source/CParse/parser.y b/Source/CParse/parser.y
index c92f82a18..04e6e9809 100644
--- a/Source/CParse/parser.y
+++ b/Source/CParse/parser.y
@@ -4489,8 +4489,9 @@ templateparameters : templateparameter templateparameterstail {
| empty { $$ = 0; }
;
-templateparameter : templcpptype {
+templateparameter : templcpptype def_args {
$$ = NewParmWithoutFileLineInfo(NewString($1), 0);
+ Setattr($$, "value", $2.rawval ? $2.rawval : $2.val);
}
| parm {
$$ = $1;