]> git.xonotic.org Git - xonotic/gmqcc.git/commitdiff
pragma line(lineno) - sets the linenumber for the line after the pragma
authorWolfgang (Blub) Bumiller <blub@speed.at>
Sun, 18 Nov 2012 14:32:03 +0000 (15:32 +0100)
committerWolfgang (Blub) Bumiller <blub@speed.at>
Sun, 18 Nov 2012 14:32:03 +0000 (15:32 +0100)
lexer.c

diff --git a/lexer.c b/lexer.c
index ecda7f7ebf0528b577e38a9b8a864ffa2b4df5d9..872df8cb3b4ce8832268fe4f7afb8f284c27052c 100644 (file)
--- a/lexer.c
+++ b/lexer.c
@@ -414,6 +414,9 @@ static bool lex_try_pragma(lex_file *lex)
         lex->name = util_strdup(param);
         vec_push(lex_filenames, lex->name);
     }
+    else if (!strcmp(command, "line")) {
+        line = strtol(param, NULL, 0)-1;
+    }
     else
         goto unroll;