📄 changelog
字号:
2001-12-24 Phil Dawes <pdawes@users.sourceforge.net> * bike/parsing/addtokens.py: Reworked addtokens scheme to 'get all tokens for node, and then pass them to children to take their nodes'. This makes for a much easier time processing tokens.2001-12-16 Phil Dawes <pdawes@users.sourceforge.net> * bike/parsing/tokenhandler.py: Changed Getattr rename functionality to work when attribute token isn't second token of node tokenlist * bike/refactor/test_renameMethod.py: refactored renameMethod tests into generic abstract base class. These are now used by the ui package (rather than vice versa) * bike/ui/bikecli.py: Added code to tell you how many changes have been made, and advice on what might be wrong if this number is 0.2001-12-15 Phil Dawes <pdawes@users.sourceforge.net> * bike/parsing/tokenhandler.py: Added getNodeTokens() implementation to miss out any preceeding cruft not picked up by addtoken functionality on previous nodes.2001-12-14 Phil Dawes <pdawes@users.sourceforge.net> * bike/refactor/renameMethod.py: Changed renameMethodDefinition to work with nested methods (utilising the new typeinfo.fqn stuff). Removed findclass and findmethod.2001-12-12 Phil Dawes <pdawes@users.sourceforge.net> * bike/ui/bikecli.py: Modified prompt message a bit. Added actual standard io stuff so that it works with a user input as well as through the test harness. * bike/refactor/renameMethod.py: Modified RenameMethodReferences to create a stack of scopes. The code uses the typeinfo from each scope to determine the type of references, and if it can't find the type there, it checks its own references deduced from the classname passed in. I.e. it assumes that the classname is a class, even if it can't find the definition, and renames instances derived from it. Also ammended the 'prompt user callback' code to only ask the user if the type engine doesnt know the type of the instance expression. (before now it was prompting if the type was not the same as the input classname)2001-12-11 Phil Dawes <pdawes@users.sourceforge.net> * bike/ui/bikecli.py: Added code to handle prompting the user for whether the method reference should be renamed. * bike/refactor/renameMethod.py: Added code to prompt user when type of object instance isn't known2001-12-08 Phil Dawes <pdawes@users.sourceforge.net> * bike/refactor.py: now takes advantage of typeinfo stuff to deduce types of references 2001-12-03 Phil Dawes <pdawes@users.sourceforge.net> * bike/parsing/addtypeinfo.py: New classes to deduce the types of references. Adds a typeinfo attribute to each scope ast node, which maps reference names to their types (currently as strings).2001-11-26 Phil Dawes <pdawes@users.sourceforge.net> * bike/refactor/renameMethod.py: Added stack to maintain references to object instances while visiting package structure2001-11-25 Phil Dawes <pdawes@users.sourceforge.net> * bike/refactor/renameMethod.py: Added support for 'from foo import *' * bike/ui/test_bikecli.py: Refactored tests so that all the single file tests are exercised in a package hierarchy context.2001-11-24 Phil Dawes <pdawes@users.sourceforge.net> * bike/refactor/renameMethod.py: Added support to rename methods based on imported classes2001-11-23 Phil Dawes <pdawes@users.sourceforge.net> * bike/refactor/renameMethod.py: Refactored code (took out RenameMethod class, since wasnt using instance state). Added support for compound references (a.b.c.foo)2001-11-21 Phil Dawes <pdawes@users.sourceforge.net> * bike/parsing/load_application.py: removed. (see load.py instead) * bike/refactor/renameMethod.py: Added support for fully qualified classnames in _findClass. e.g. a.b.bah.foo. This means that the ui now supports renaming package nested methods (but not their references).2001-11-20 Phil Dawes <pdawes@users.sourceforge.net> * bike/parsing: Added fixes to parser module to reflect changes in python 2.2 compiler module2001-11-16 Phil Dawes <pdawes@users.sourceforge.net> * bike/parsing/output.py: new function 'save' saves an entire ast tree * bike/refactor/renameMethod.py: Adapted to take an ast rather than source file2001-11-14 Phil Dawes <pdawes@bea.com> * bike/parsing/load.py: Replacement for load_application.py using Juergen's pythius loader code. load() hierarchically loads a bunch of packages and modules into a big AST. * bike/parsing/extended_ast.py: Fleshed out Package and Top nodes to support hierarchical module ast2001-11-08 Phil Dawes <pdawes@users.sourceforge.net> * bike/parsing/load_application.py: Fixed import visitor code to handle comma seperated imports. (i.e. import foo,bar). Added code to recognise imports via a from clause (i.e. from foo import bar) Removed Imports.py. Integrated code into load_application 2001-11-06 Phil Dawes <pdawes@users.sourceforge.net> * bike/parsing/load_application.py: Added load_application and Imports modules back into build. Started writing tests for them. 2001-11-05 Phil Dawes <pdawes@users.sourceforge.net> * bike/parsing/brmtransformer.py : Rewrote this to override the methods which create nodes at the root of the parse. This means that a few methods adding parser nodelists to ast nodes should cater for practically all the AST nodes. * bike/parsing/tokenhandler.py (GetattrTokenHander.renameAttr): added renameAttr method which renames the attribute in the object state, and in the corresponding tokens. This is a very brittle implementation, but will be fixed as new functionality is added. (it's the simplist thing right now) * bike/parsing/addtokens.py (AddTokens.visitGetattr): added token support for getattr * bike/parsing/tokenutils.py: Added getTokensPreceedingNodes, which takes a parsetree of nodes and returns all the tokens before the node represented by the parsetree. This is important because until there is an token-handling implementation of all the ast nodes, some tokens will be missed. By eating the tokens in between the implemented ast nodes, this ensures all the tokens will be outputted at the end. 2001-10-30 Phil Dawes <pdawes@users.sourceforge.net> Created new CVS module, which makes use of distutils much more uniform. * setup.py: Created distutils setup stript: 2001-10-25 Phil Dawes <pdawes@users.sourceforge.net> * parsing/output.py: Code to handle spacing in inline comments * refactor/renameMethod.py: Started code to handle references when object is created in same scope2001-10-24 Phil Dawes <pdawes@users.sourceforge.net> * parsing/output.py: spaces in conditionals (a == b etc..) * parsing/tokenutils.py: Refactored code in TokenList to handle rearranging indent/dedent tokens so that whole-line comments are indented with the things they comment. The transformations are now done after the initial scan (slower, but easier to follow) 2001-10-23 Phil Dawes <pdawes@users.sourceforge.net> * parsing/output.py: ensured a.b not seperated by spaces. 2001-10-22 Phil Dawes <pdawes@users.sourceforge.net> * parsing/output.py: Code to seperate a=b with spaces (a = b) * ui/test_cli.py: Merged cli tests with renameMethod tests to ensure all tests work through the cli2001-10-19 Phil Dawes <pdawes@users.sourceforge.net> * */testall.py: unified testing scripts so that all tests can be run from one place 2001-10-15 Phil Dawes <pdawes@users.sourceforge.net> * ui/cli.py: Added simple command line interface.2001-10-14 Phil Dawes <pdawes@users.sourceforge.net> * parsing/output.py: Finished simple ast->string functionality 2001-10-13 Phil Dawes <pdawes@users.sourceforge.net> * testall.py: added master test script * parsing/tokenhandler.py (FunctionTokenHandler.rename): added rename a function and keep tokens in sync functionality2001-10-12 Phil Dawes <pdawes@users.sourceforge.net> * parsing/output.py: started tokens -> string functionality2001-10-07 Phil Dawes <pdawes@users.sourceforge.net> * refactor/renameMethod.py: very basic findClass, findMethod functionality. Needs refactoring into analysis package, and merging with existing code 2001-10-05 Phil Dawes <pdawes@users.sourceforge.net> * refactor/simplediff.py: wrote a simple diff utility to support writing top down tests. (i.e. do a renameMethod, then assert that the diff is correct) 2001-10-04 Phil Dawes <pdawes@users.sourceforge.net> * refactor/renameMethod.py: Got fedup with trying to secondguess what the parser module should do. Decided to do some top-down proper XP style development. Started with implementing the renameMethod story.2001-10-01 Phil Dawes <pdawes@users.sourceforge.net> * parsing/test_addtokens.py: refactored tests so that they use brmtransformer to get a node, rather than mocking it.2001-09-29 Phil Dawes <pdawes@users.sourceforge.net> * parsing/brmtransformer.py: Added nodelist to pass_stmt 2001-09-28 Phil Dawes <pdawes@users.sourceforge.net> * parsing/addtokens.py (AddTokens.visitModule): finished method * parsing/tokenutils.py (TokenConverter.getTokensUptoLastNewlineBeforeCode): method added2001-09-27 Phil Dawes <pdawes@users.sourceforge.net> * parsing/addtokens.py: started visitmodule() impl * parsing/extended_ast.py: Added tokens support to Module2001-09-26 Phil Dawes <pdawes@users.sourceforge.net> * parsing/test_addtokens.py Refactored tests. Made up better names.2001-09-25 Phil Dawes <pdawes@users.sourceforge.net> Laptop broke. Continuing with an older version of the code (hence the gap in changelog) * parsing/tokenutils.py (TokenConverter.getTokensToColon): Added function which just gobbles tokens to the next colon. Refactored getTokensStartBlock() to use this instead of walking the nodelist, since I think all * parsing/addtokens.py (AddTokens.visitFunction): Now that function and class no longer need to pass in partial nodelists, the code is common. Refactored common code into visitCompoundNode(). (hence the gap in the changelog) * parsing/tokenhandler.py: removed the preceeding tokens code - you ain't gonna need it! * parsing/test_addtokens.py: changed visitclass tests to use mockobjects2001-09-10 Phil Dawes <pdawes@users.sourceforge.net> * parsing/tokenhandler.py: * parsing/*: Integrated code with bike parsing package Split tokenhandler base classes into seperate module Merged brmast stuff into extended_ast package 2001-09-08 Phil Dawes <pdawes@users.sourceforge.net> * test_tokenutils.py: Added more unit tests 2001-09-06 Phil Dawes <pdawes@users.sourceforge.net> * test_tokenutils.py: Added more unit tests 2001-09-04 Phil Dawes <pdawes@users.sourceforge.net> * test_addtokens.py: Added some mock objects and tests 2001-08-31 Phil Dawes <pdawes@users.sourceforge.net> * test_tokenutils.py: beefed up the unit tests a bit2001-08-29 Phil Dawes <pdawes@users.sourceforge.net> * brmtransformer.py: This module now just contains code to add the nodelist member to each ast node as the compiler generates it. This is so the code in addtokens has access to the original python parser nodes to generate tokens from. * addtokens.py: Moved the code to add the tokens to the ast nodes to this module. It now relies on there being a 'nodelist' member on each ast object, containing the original python parser nodelist. * brmast.py: Added hack to retrofit TokenHandler base class to existing compiler.ast classes. This means that we no longer have to include compiler classes with the distribution. Not sure if this is completely legal - doesn't work with jython. Removed stock Python compiler classes from src tree. 2001-08-27 Phil Dawes <pdawes@users.sourceforge.net> Set about reimplementing the token stuff - will now add tokens to ast objects *after* the nodes have been processed by the compiler module. 2001-08-22 Phil Dawes <pdawes@users.sourceforge.net> * tokenutils.py: Added support for tokenising strings as well as files. * test_tokenutils.py: removed testdata directory, and moved all the testdata into this module, now that the tokenutils stuff can take strings as well as files * brmtransformer.py: Renamed TransformerWithTokens to Transformer, now that it's in a seperate module. * brmast.py: Refactored the added token code out of ast module into this one. Created a seperate mixin called TokenHandler rather than sticking this code in the Node base class. Each class now re-inherits this baseclass. Unfortunately this means that I had to modify the transformer.py file to import brmast rather than ast. Need to think of a better way of doing this.2001-08-21 Phil Dawes <pdawes@users.sourceforge.net> * brmtransformer.py: Created new brmtransformer module and refactored token code from transformer.Transformer into seperate class TransformerWithTokens. Refactored common code from
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -