]> git.xonotic.org Git - xonotic/gmqcc.git/blobdiff - parser.c
Fix con_vprintmsg madness
[xonotic/gmqcc.git] / parser.c
index 38af9a9e0dacc6997bcc9ede49a1e496fc4c3ce9..25c9c74c9fd18c7bc45bd3e6da80d00f7874b79f 100644 (file)
--- a/parser.c
+++ b/parser.c
@@ -2637,8 +2637,8 @@ static ast_value *parse_parameter_list(parser_t *parser, ast_value *var)
     }
 
     /* sanity check */
-    if (vec_size(params) > 8)
-        parseerror(parser, "more than 8 parameters are currently not supported");
+    if (vec_size(params) > 8 && opts_standard == COMPILER_QCC)
+        (void)!parsewarning(parser, WARN_EXTENSIONS, "more than 8 parameters are not supported by this standard");
 
     /* parse-out */
     if (!parser_next(parser)) {
@@ -3425,6 +3425,16 @@ bool parser_compile_file(const char *filename)
     return parser_compile();
 }
 
+bool parser_compile_string_len(const char *name, const char *str, size_t len)
+{
+    parser->lex = lex_open_string(str, len, name);
+    if (!parser->lex) {
+        con_err("failed to create lexer for string \"%s\"\n", name);
+        return false;
+    }
+    return parser_compile();
+}
+
 bool parser_compile_string(const char *name, const char *str)
 {
     parser->lex = lex_open_string(str, strlen(str), name);