[IronPython] Compiler error for invalid field access

Ori oorrii at gmail.com
Sun Aug 5 21:51:43 CEST 2007


Hello,

I'm using the following code to compile python code:

SystemState state = new SystemState();
MyCompilerSink sink = new MyCompilerSink();
CompilerContext context = new CompilerContext(string.Empty, sink);
Parser parser = Parser.FromString(state, context, "my code");
parser.ParseFileInput();

it works find for finding syntax mistakes - but I also wan to know about
invalid property names / method names. If for example the code uses the
expression 'self.Name' I would like to see a compilation error if the object
does not have a 'Name' property.

Is there a way to do it?

Thanks,
Ori
-- 
View this message in context: http://www.nabble.com/Compiler-error-for-invalid-field-access-tf4220967.html#a12007623
Sent from the IronPython mailing list archive at Nabble.com.




More information about the Ironpython-users mailing list