[clever] r439 committed - - Fixed most memleaks by adding a semantic action

0 views
Skip to first unread message

cle...@googlecode.com

unread,
May 17, 2011, 8:54:03 PM5/17/11
to cleve...@googlegroups.com
Revision: 439
Author: muriloufg
Date: Tue May 17 17:53:24 2011
Log: - Fixed most memleaks by adding a semantic action
http://code.google.com/p/clever/source/detail?r=439

Modified:
/trunk/include/ast.h
/trunk/src/parser.y

=======================================
--- /trunk/include/ast.h Tue May 17 17:14:59 2011
+++ /trunk/include/ast.h Tue May 17 17:53:24 2011
@@ -329,7 +329,7 @@
m_modifier->addRef();
}

- virtual ~AttributeDeclaration() {
+ ~AttributeDeclaration() {
m_modifier->delRef();
}
private:
@@ -705,7 +705,7 @@
m_modifier->addRef();
}

- virtual ~MethodDeclaration() {
+ ~MethodDeclaration() {
m_modifier->delRef();
}

=======================================
--- /trunk/src/parser.y Tue May 17 17:14:59 2011
+++ /trunk/src/parser.y Tue May 17 17:53:24 2011
@@ -167,7 +167,7 @@
| assign_stmt ';' { tree.top()->add($1); }
| import_stmt ';' { tree.top()->add($1); }
| return_stmt ';' { tree.top()->add($1); }
- | class_declaration
+ | class_declaration { tree.top()->add($1); }
;

return_stmt:
@@ -189,8 +189,8 @@
TYPE IDENT '(' args_declaration ')' block_stmt { $$ = new
ast::FuncDeclaration($2, $1, $4, $6); }
;

-class_declaration:
- CLASS TYPE '{' class_stmt '}'
+class_declaration:
+ CLASS TYPE '{' class_stmt '}' { $$ = $4; }
;

access_modifier:

Reply all
Reply to author
Forward
0 new messages