@@ -94,7 +94,7 @@ impl Builder {
9494 }
9595 self.fmt.groupDecls[&ast::Var, ast::Node](ast.Nodes, i, fn(mut &d: &ast::Var) {
9696 unsafe {
97- if !d.Binded && isPub(d.Ident ) {
97+ if !d.Bind && isPub(d.Name ) {
9898 self.fmt.buf.Write(self.fmt.indent)!
9999 self.fmt.varDecl(d, true, [])
100100 }
@@ -120,47 +120,47 @@ impl Builder {
120120 // Reader cannot know the type of the "foo". The code writer should
121121 // be consider cases like this and should write type declaration.
122122 v := node.Data.(&ast::Var)
123- if v.Binded {
123+ if v.Bind {
124124 ret nil
125125 }
126- doc.Name = v.Ident
126+ doc.Name = v.Name
127127 doc.Owner = doc::Var
128128 | &ast::Func:
129129 // NOTE:
130130 // We do not have to check whether this function is a test function.
131131 // According to Jule's test function rules, a test function never can be public.
132132 // So we will not document test functions.
133133 f := node.Data.(&ast::Func)
134- if f.Binded {
134+ if f.Bind {
135135 ret nil
136136 }
137- doc.Name = f.Ident
137+ doc.Name = f.Name
138138 doc.Owner = doc::Func
139139 | &ast::Struct:
140140 s := node.Data.(&ast::Struct)
141- if s.Binded {
141+ if s.Bind {
142142 ret nil
143143 }
144- doc.Name = s.Ident
144+ doc.Name = s.Name
145145 doc.Owner = doc::Struct
146146 | &ast::Trait:
147147 t := node.Data.(&ast::Trait)
148- doc.Name = t.Ident
148+ doc.Name = t.Name
149149 doc.Owner = doc::Trait
150150 | &ast::Enum:
151151 e := node.Data.(&ast::Enum)
152- doc.Name = e.Ident
152+ doc.Name = e.Name
153153 doc.Owner = doc::Enum
154154 | &ast::TypeEnum:
155155 e := node.Data.(&ast::TypeEnum)
156- doc.Name = e.Ident
156+ doc.Name = e.Name
157157 doc.Owner = doc::TypeEnum
158158 | &ast::TypeAlias:
159159 a := node.Data.(&ast::TypeAlias)
160- if a.Binded {
160+ if a.Bind {
161161 ret nil
162162 }
163- doc.Name = a.Ident
163+ doc.Name = a.Name
164164 if a.Strict {
165165 doc.Owner = doc::StrictTypeAlias
166166 } else {
@@ -208,27 +208,27 @@ impl Builder {
208208 fn analysisImpl(self, mut ast: &ast::Impl) {
209209 // Destination type should be simple identifier type.
210210 // Otherwise we have to assume this implementation is not suitable to analysis.
211- dest, _ := ast.Dest.Kind .(&ast::IdentExpr )
211+ dest, _ := ast.Dest.Data .(&ast::NameExpr )
212212 if dest == nil {
213213 ret
214214 }
215215 // Destination is not public. Skip.
216- if !isPub(dest.Ident ) {
216+ if !isPub(dest.Name ) {
217217 ret
218218 }
219- mut meta := self.getStructMeta(dest.Ident )
219+ mut meta := self.getStructMeta(dest.Name )
220220 // If it is trait implementation, we have to check identifier type for
221221 // the trait type declaration for implementation. If identifier type is
222222 // not public, no need for documentation.
223223 if ast.IsTraitImpl() {
224- name, isName := ast.Base.Kind .(&ast::IdentExpr )
225- if isName && !isPub(name.Ident ) {
224+ name, isName := ast.Base.Data .(&ast::NameExpr )
225+ if isName && !isPub(name.Name ) {
226226 ret
227227 }
228228 meta.Traits = append(meta.Traits, self.formatType(ast.Base))
229229 }
230230 for (_, mut m) in ast.Methods {
231- if isPub(m.Ident ) {
231+ if isPub(m.Name ) {
232232 mut node := ast::Node{
233233 Token: m.Token,
234234 Data: m,
0 commit comments