summaryrefslogtreecommitdiff
path: root/src/symlist.c
diff options
context:
space:
mode:
authorAlex Rozenman <rozenman@gmail.com>2009-07-04 22:16:17 +0300
committerAlex Rozenman <rozenman@gmail.com>2009-07-04 22:16:17 +0300
commitd5e8574bf681b11db872279b1648bf6cc5095c9f (patch)
tree6dac19b40be50b45cae50e821fb19e3ca21b54a1 /src/symlist.c
parentae09ec8577cbf72188164ab42ba2ea022722b78c (diff)
downloadbison-d5e8574bf681b11db872279b1648bf6cc5095c9f.tar.gz
Style changes and factoring.
* src/named-ref.h: Add comments. * src/parse-gram.y: Readability and style changes. * src/reader.c: Factoring: assign_named_ref function. * src/scan-code.l: Factoring and style changes. Rename parse_named_ref to parse_ref. Use "c-ctype.h" from gnulib. Use "unsigned" type for variant index. Improve readablity. * src/scan-gram.l: Change error messages and add comments. * src/symlist.h: symbol_list_null: New function decl. * src/symlist.c: symbol_list_null: Implement here. * tests/named-refs.at: Adjust for new error messages.
Diffstat (limited to 'src/symlist.c')
-rw-r--r--src/symlist.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/symlist.c b/src/symlist.c
index 974d974c..b3500d2d 100644
--- a/src/symlist.c
+++ b/src/symlist.c
@@ -208,6 +208,12 @@ symbol_list_n_type_name_get (symbol_list *l, location loc, int n)
return l->content.sym->type_name;
}
+bool
+symbol_list_null (symbol_list *node)
+{
+ return !node ||
+ (node->content_type == SYMLIST_SYMBOL && !(node->content.sym));
+}
void
symbol_list_destructor_set (symbol_list *node, char const *code, location loc)