[phc-internals] svn commit by edsko
svn at phpcompiler.org
svn at phpcompiler.org
Wed Nov 30 10:43:15 GMT 2005
After some hassling over the point of assertions, made a minor change ;)
# Changed
U phc/doc/STATUS
U phc/src/translation/variable_targets.cpp
# Diff
Modified: phc/doc/STATUS
===================================================================
--- phc/doc/STATUS 2005-11-30 00:16:36 UTC (rev 404)
+++ phc/doc/STATUS 2005-11-30 10:43:13 UTC (rev 405)
@@ -1,3 +1,10 @@
+-- 30 November 2005
+
+o Remove AST_global
+o Update the unparser (TreeTransform)
+o Better error handling
+o Make yyparse not use the global php_script variable
+
-- 2 November 2005
o Write a transform that cleans up instring syntax "x is $x" should be
Modified: phc/src/translation/variable_targets.cpp
===================================================================
--- phc/src/translation/variable_targets.cpp 2005-11-30 00:16:36 UTC (rev 404)
+++ phc/src/translation/variable_targets.cpp 2005-11-30 10:43:13 UTC (rev 405)
@@ -28,7 +28,6 @@
public:
VariableTargets() : in_run(false) {}
-
virtual ~VariableTargets() {}
void pre_php_script(AST_php_script* in, AST_php_script** out)
@@ -48,6 +47,7 @@
{
Token_variable_name* name = new Token_variable_name((*i)->c_str());
AST_attribute* attr = new AST_attribute(name);
+ attr->attr_mod->is_static = true;
main->members->push_back(attr);
}
all_refs.clear();
@@ -67,7 +67,10 @@
void pre_global_declaration(AST_global_declaration* in, AST_statement** out)
{
- if(in_run) assert(false);
+ if(in_run)
+ {
+ printf("Warning: global statement outside the scope of a method has no effect\n");
+ }
Vector<AST_variable_name*>::const_iterator i;
for(i = in->variable_names->begin(); i != in->variable_names->end(); i++)
More information about the phc-internals
mailing list