diff options
Diffstat (limited to 'src/CompilerKit')
| -rw-r--r-- | src/CompilerKit/src/Frontends/NectarCompiler+Chk.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/CompilerKit/src/Frontends/NectarCompiler+Chk.cpp b/src/CompilerKit/src/Frontends/NectarCompiler+Chk.cpp index 5c51309..f42ad0a 100644 --- a/src/CompilerKit/src/Frontends/NectarCompiler+Chk.cpp +++ b/src/CompilerKit/src/Frontends/NectarCompiler+Chk.cpp @@ -48,6 +48,13 @@ CK_IMPORT_C bool NectarCheckFrontend(CompilerKit::STLString& input) { } } + if (input.find("(") != CompilerKit::STLString::npos && !input.ends_with(";")) { + if (input.find(":=") == CompilerKit::STLString::npos) { + Detail::print_error("A function call must always end with ';'", "check"); + return false; + } + } + if (input.find("const ") != CompilerKit::STLString::npos && !input.ends_with(";")) { if (input.find(":=") != CompilerKit::STLString::npos) { Detail::print_error("A declaration must always end with ';'", "check"); |
