On Saturday, December 9, 2017 at 5:25:36 AM UTC-6, Edward K. Ream wrote: *To do* > > Check the arguments in the call to f1 against the arguments in the > signature. The call to print(p.v) in f1 does *not* have to be checked! >
Done, in a rudimentary way, at rev 4c010c3. The code calls check_arg to check that the calling arg p.v is compatible with the signature's arg p. It's not. That's all we need! check_arg doesn't actually do any checking, but that's a nit :-) When this works the checker will have found an error that neither pyflakes > nor pylint can detect. > I think we can say that the prototype has passed this milestone. There is a ton of work to do to make the tool usable, and a lot more debugging, but I want to list the successes: 1. Using regex's to "parse" lines created *from the ast* has been a spectacular success. Using the ast in this minimal way is a clever way of eliminating complications arising from comments, strings, etc. 2. Unlike in true type checking, the code does not check, *and will never check*, the values returned from functions. They are *irrelevant *in a convention checker. Only names are needed. This is a huge simplification. 3. Chain resolution needs a lot more work. It's far from easy, but clearly it can be made to work. 4. Only the init_classes method knows anything about Leo classes or conventions. This knowledge resides in various dicts, which work like rudimentary symbol tables. It should be clear how to create such dicts from, say, @data nodes. Therefore, we can say that the prototype does not depend in any fundamental way on Leo. 5. This prototype ignores *many* details, including tricky details about scopes and types. That's just what has made this prototype so useful. No need to spend months on arcane nits. This has kept the energy level high. For every slipshod hack in the prototype, there is at least one correct implementation. In particular, we could convert many operations to ast operations. This actually might be the easy way of handling nested scopes, for example. But I have, on purpose, ignored such things for now. *Summary* Three days ago I had no idea that this project could be demonstrated so easily. Edward -- You received this message because you are subscribed to the Google Groups "leo-editor" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/leo-editor. For more options, visit https://groups.google.com/d/optout.
