Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

每一个类只能是一个文件 #2

Closed
GoogleCodeExporter opened this issue Sep 7, 2015 · 2 comments
Closed

每一个类只能是一个文件 #2

GoogleCodeExporter opened this issue Sep 7, 2015 · 2 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. 多个类混合在一个文件,解析不能成功
2.
3.

What is the expected output? What do you see instead?


Please use labels and text to provide additional information.
逐个分散文件,包括有:
CompositeElement.js
WindowManager.js
Form/Action.js

Original issue reported on code.google.com by paco...@gmail.com on 6 Jun 2008 at 12:45

@GoogleCodeExporter
Copy link
Author

Original comment by paco...@gmail.com on 10 Jun 2009 at 5:37

  • Changed state: Fixed

@GoogleCodeExporter
Copy link
Author

        l('Opening JS files:{0}'.format(jsFile.Path));
        var _r = fileContent.split(/@class/);
        if(Array.isArray(_r) && _r.length >2){
            _r.remove(_r[0]);
            Array.each(_r, function(i){
                this.put(new doc.ClassParser({
                     source   : '/**\n * @class '+i
                    ,fileName : jsFile.Path.split('\\').pop()
                }));
            }, this);
        }else{
            this.put(new doc.ClassParser({
                 source   : fileContent
                ,fileName : jsFile.Path.split('\\').pop()
            }));
        }
        l('.....JS files:{0}...done.It has {1} class(es) in it.'.format(jsFile.Path,
_r.length-1

Original comment by paco...@gmail.com on 10 Jun 2009 at 5:38

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant