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.
This commit is contained in:
Alex Rozenman
2009-07-04 17:52:38 +03:00
parent 83ea2423f5
commit 872b52bc24
9 changed files with 222 additions and 195 deletions

View File

@@ -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)