add hidden option
[calc.git] / parser.c
index 4da6b6b64b31497d702bffba03a42135cc206e95..5333a9c4a06ee01163a972a544777eb2cde1977f 100644 (file)
--- a/parser.c
+++ b/parser.c
@@ -195,6 +195,15 @@ element_t *parser (char *str, char **next, int prio)
         element_t *new = NULL;
         VERBOSE (INFO, fprintf (stdout, "Processing: %s\n", str));
 
+        /* end without printing */
+
+        if (*str == ';') {
+            if (root) {
+                root->hidden = 1;
+            }
+            break;
+        }
+
         /* skip spaces and tabs */
 
         if ((*str == ' ') || (*str == '\t')) {
@@ -670,7 +679,7 @@ void help (void)
     fprintf (stdout, "storage functions:");
     fprintf (stdout, " sto rcl inc dec\n");
     fprintf (stdout, "conditional functions:");
-    fprintf (stdout, " cond while print {}\n");
+    fprintf (stdout, " cond while print {} ;\n");
     fprintf (stdout, "miscellaneous functions:");
     fprintf (stdout, " quit help\n");
     fprintf (stdout, "supported constants:");