summaryrefslogtreecommitdiffstats
path: root/parser.y
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2015-07-10 08:33:17 -0700
committerKaz Kylheku <kaz@kylheku.com>2015-07-10 08:33:17 -0700
commit0c15b355ad3a62e13e27d752047b4566da97153f (patch)
tree402dd8189a5cdc8a92f1f075b1c9d6853ee79cf1 /parser.y
parent79559dec677dcc147d79222e3ce5a30cf17b1164 (diff)
downloadtxr-0c15b355ad3a62e13e27d752047b4566da97153f.tar.gz
txr-0c15b355ad3a62e13e27d752047b4566da97153f.tar.bz2
txr-0c15b355ad3a62e13e27d752047b4566da97153f.zip
Handle setting of parse name through prime_parser.
* parser.c (prime_parser): Take name as argument, and install it into parser. (lisp_parser): Pass name to parse, instead of setting it in the parser object. * parser.y (parse): Take name as argument and pass down to prime_parser. * parser.h (prime_parser, parse): Declarations updated.
Diffstat (limited to 'parser.y')
-rw-r--r--parser.y4
1 files changed, 2 insertions, 2 deletions
diff --git a/parser.y b/parser.y
index e71adfda..e82e5b7a 100644
--- a/parser.y
+++ b/parser.y
@@ -1456,14 +1456,14 @@ int parse_once(val stream, val name, parser_t *parser)
return res;
}
-int parse(parser_t *parser)
+int parse(parser_t *parser, val name)
{
int res;
parser->errors = 0;
parser->prepared_msg = nil;
parser->syntax_tree = nil;
- prime_parser(parser, reset_scanner(parser->scanner));
+ prime_parser(parser, reset_scanner(parser->scanner), name);
res = yyparse(parser->scanner, parser);