Permalink
Browse files

Disallow optional '(' after first parameter on Sub calls.

Prevents things like: foo a, (b, c)
  • Loading branch information...
1 parent 7d065cd commit 2e0f8f25bb9fd4ac346fba7db6de3c6574619ed6 @countingpine countingpine committed Apr 2, 2013
Showing with 5 additions and 0 deletions.
  1. +1 −0 changelog.txt
  2. +4 −0 src/compiler/parser-proccall-args.bas
View
@@ -219,6 +219,7 @@ Version 0.25.0:
- C++ name mangling ignored CONST on return types of function pointers used as parameters in overloaded procedures
- -lang qb/fblite: "EXIT SUB/FUNCTION" above a "SELECT CASE string" tried to destroy an uninitialized string variable
- BSAVE was returning "file not found" errors on invalid arguments instead of "illegal function call" errors
+- Sub calls were allowing the optional parentheses to start after the first argument, e.g. 'foo a, (b, c)'
Version 0.24.0:
@@ -57,6 +57,10 @@ private function hProcArg _
'' Expression
expr = cExpression( )
+
+ '' disable optional opening '{' after first parameter
+ fbSetPrntOptional( FALSE )
+
if( expr = NULL ) then
if( (options and FB_PARSEROPT_ISFUNC) <> 0 ) then
expr = NULL

0 comments on commit 2e0f8f2

Please sign in to comment.