add unmatch handler

This commit is contained in:
Yuichi Nishiwaki 2014-08-12 08:32:52 +09:00
parent aec33d59da
commit d2a06d8efa
1 changed files with 10 additions and 1 deletions

View File

@ -658,6 +658,15 @@ read_label(pic_state *pic, struct pic_port *port, int c)
read_error(pic, "broken label expression"); read_error(pic, "broken label expression");
} }
static pic_value
read_unmatch(pic_state *pic, struct pic_port *port, int c)
{
UNUSED(port);
UNUSED(c);
read_error(pic, "unmatched parenthesis");
}
static pic_value static pic_value
read_dispatch(pic_state *pic, struct pic_port *port, int c) read_dispatch(pic_state *pic, struct pic_port *port, int c)
{ {
@ -699,7 +708,7 @@ read_nullable(pic_state *pic, struct pic_port *port, int c)
switch (c) { switch (c) {
case ')': case ')':
read_error(pic, "unmatched parenthesis"); return read_unmatch(pic, port, c);
case ';': case ';':
return read_comment(pic, port, c); return read_comment(pic, port, c);
case '#': case '#':