ARudik / phc

Automatically exported from code.google.com/p/phc
0 stars 0 forks source link

maketea: Add check_invariant function #33

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
check_invarants would be a function you can call from any point in which
you expect the AST to be stable, which checks, for now, that things which
shouldnt be NULL arent. It will also call a check_mixin_invariant function,
which is user defined.

Original issue reported on code.google.com by paul.biggar on 14 May 2007 at 10:46

GoogleCodeExporter commented 9 years ago
Added. The method is called is_valid, and checks for NULLs as specified. It also
calls is_mixin_valid for those classes where it exists. For token classes, 
is_valid
checks if valid is not NULL, or, for those classes that have a source_rep, it 
checks
that source_rep isn't NULL and calls is_value_valid. is_value_valid defaults to
"return true;" but can of course be overridden in the mixin code.

Original comment by edskodev...@gmail.com on 3 Jun 2007 at 12:28