Ejemplo n.º 1
0
 /// <summary>
 /// 开始对指定的节点解析。
 /// </summary>
 /// <param name="script">语法树。</param>
 /// <param name="comments">所有注释。</param>
 /// <returns>全局对象。所有变量都可从这个节点找到。</returns>
 public void Parse(Script script, DocComment[] comments)
 {
     _map = comments;
     _position = 0;
     CurrentScope = new Scope() { CurrentMemberOf = "window" };
     VisitScript(script);
 }
Ejemplo n.º 2
0
 void PushScope(DocComment docComment)
 {
     Scope scope = new Scope();
     scope.Comment = docComment;
     scope.Parent = CurrentScope;
     scope.CurrentMemberOf = CurrentScope.CurrentMemberOf;
     scope.CurrentMemberOfIsClass = CurrentScope.CurrentMemberOfIsClass;
     CurrentScope = scope;
 }