Added support for the unary plus operator in expressions.
Amazingly, this never seems to be have been added to SWIG before ;-). git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@4247 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
7a8f71fa7c
commit
37d8bc265b
1 changed files with 5 additions and 1 deletions
|
|
@ -4213,7 +4213,11 @@ exprcompound : expr PLUS expr {
|
|||
$$.val = NewStringf("-%s",$2.val);
|
||||
$$.type = $2.type;
|
||||
}
|
||||
| NOT expr {
|
||||
| PLUS expr %prec UMINUS {
|
||||
$$.val = NewStringf("%s",$2.val);
|
||||
$$.type = $2.type;
|
||||
}
|
||||
| NOT expr {
|
||||
$$.val = NewStringf("~%s",$2.val);
|
||||
$$.type = $2.type;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue