diff options
Diffstat (limited to 'src/parser.y')
-rw-r--r-- | src/parser.y | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/parser.y b/src/parser.y index 5a4c409..d7e8168 100644 --- a/src/parser.y +++ b/src/parser.y @@ -11,6 +11,7 @@ static ast_t astmerge(int, ast_t, ast_t); static void *xmalloc(size_t); static void yyerror(const char *); +extern bool lflag; extern const char *current_file; %} @@ -44,7 +45,10 @@ extern const char *current_file; input : %empty - | input line { astprocess($2); } + | input line { + if ($2.eqn != NULL) + (lflag ? astprocess_latex : astprocess_cli)($2); + } ; line |