Fix with function definitions of zero params

This commit is contained in:
Jonathan Turner
2009-06-30 19:11:12 +00:00
parent 1bc71d21bd
commit e6a0dc9af6
2 changed files with 10 additions and 3 deletions

View File

@@ -651,7 +651,8 @@ namespace chaiscript
}
if (Char('(')) {
if (!(Arg_List() && Char(')'))) {
Arg_List();
if (!Char(')')) {
throw Parse_Error("Incomplete function definition", File_Position(line, col), filename);
}
}