瀏覽代碼

List_addLast correction

master
Nathan R 3 年之前
父節點
當前提交
98d4b84778
共有 1 個檔案被更改,包括 5 行新增5 行删除
  1. +5
    -5
      ccmeta.leg

+ 5
- 5
ccmeta.leg 查看文件

@ -1005,7 +1005,7 @@ oop listEnd(void)
return list; return list;
} }
oop List_addLast(oop list, oop obj) {
void List_addLast(oop list, oop obj) {
assert(list); assert(list);
map_append(list, obj); map_append(list, obj);
} }
@ -1317,9 +1317,9 @@ declaration = @{ C_declarationBegin() }
declarationSpecifiers = @{ int specified= 0 } { listBegin() } declarationSpecifiers = @{ int specified= 0 } { listBegin() }
( s:storageClassSpecifier { listAppend(s) } ( s:storageClassSpecifier { listAppend(s) }
| s:typeSpecifier @{ specified++ } { listAppend(s) } | s:typeSpecifier @{ specified++ } { listAppend(s) }
#| | s:typedefName &{ !specified++ } { listAppend(s) }
#| | s:typeQualifier { listAppend(s) }
#| | s:functionSpecifier { listAppend(s) }
| s:typedefName &{ !specified++ } { listAppend(s) }
| s:typeQualifier { listAppend(s) }
| s:functionSpecifier { listAppend(s) }
)+ { $$= listEnd() } )+ { $$= listEnd() }
| &{gnu} { $$= listEmpty() } | &{gnu} { $$= listEmpty() }
@ -1623,7 +1623,7 @@ externalDeclaration = { yylval = newComment(yytext); }
| ( SEMI &{gnu} | ( SEMI &{gnu}
| c:constant { yylval = c; } #################| TODO | c:constant { yylval = c; } #################| TODO
| declaration | declaration
#| | functionDefinition
| functionDefinition
#| | meta #| | meta
| &. &{ errmsg= "declaration expected" } error | &. &{ errmsg= "declaration expected" } error
) { yylval= $$; } ) { yylval= $$; }

Loading…
取消
儲存