]> mj.ucw.cz Git - eval.git/blobdiff - judge/token.c
Judge: Added function get_nl() for checking of an expected end of line.
[eval.git] / judge / token.c
index 795cc084e28f142a86e838f88129ac0746258ac6..4606395483935493c2d8715099174c389254b820 100644 (file)
@@ -163,3 +163,10 @@ GET(long, long int)
 GET(ulong, unsigned long int)
 GET(double, double)
 GET(long_double, long double)
+
+void get_nl(struct tokenizer *t)
+{
+  char *tok = get_token(t);
+  if (tok && *tok)
+    tok_err(t, "Expected end of line");
+}