mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-04 18:29:37 +02:00
Better parse checking on "funcall" rule.
This commit is contained in:
parent
719841eb20
commit
410b92c611
1 changed files with 11 additions and 1 deletions
|
@ -1246,7 +1246,17 @@ funcall returns [VectorSTL<OpTpl> value]
|
||||||
@init {
|
@init {
|
||||||
$Return::noReturn = true;
|
$Return::noReturn = true;
|
||||||
}
|
}
|
||||||
: e=expr_apply { $value = (VectorSTL<OpTpl>) e; }
|
: e=expr_apply {
|
||||||
|
if (e instanceof VectorSTL<?>)
|
||||||
|
$value = (VectorSTL<OpTpl>) e;
|
||||||
|
else {
|
||||||
|
Location loc = null;
|
||||||
|
if (e instanceof ExprTree) {
|
||||||
|
loc = ((ExprTree)e).location;
|
||||||
|
}
|
||||||
|
reportError(loc,"Functional operator requires a return value");
|
||||||
|
}
|
||||||
|
}
|
||||||
;
|
;
|
||||||
|
|
||||||
build_stmt returns [VectorSTL<OpTpl> ops]
|
build_stmt returns [VectorSTL<OpTpl> ops]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue