lift single lib statement restriction
[m6w6/ext-psi] / src / parser_proc_grammar.y
index a32600fec0b63f883a304b36fe9d1f9ff4b14bd8..5f78335bfbd781e1fd5ee3a9ac2abf49da8c6d9b 100644 (file)
@@ -456,12 +456,8 @@ block:
        }
 }
 |      lib {
-       if (P->file.ln) {
-               P->error(PSI_DATA(P), $lib, PSI_WARNING,
-                               "Extra 'lib \"%s\"' statement has no effect", $lib->text);
-       } else {
-               P->file.ln = strndup($lib->text, $lib->size);
-       }
+       char *libname = strdup($lib->text);
+       P->file.libnames = psi_plist_add(P->file.libnames, &libname);
 }
 |      constant {
        psi_parser_proc_add_const(P, $constant);