Skip to content

Commit 4d174e9

Browse files
committed
juledoc: update to latest jule
1 parent 3461147 commit 4d174e9

File tree

2 files changed

+15
-15
lines changed

2 files changed

+15
-15
lines changed

builder/builder.jule

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -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.Bind && isPub(d.Name) {
97+
if !d.Extern && isPub(d.Name) {
9898
self.fmt.buf.Write(self.fmt.indent)!
9999
self.fmt.varDecl(d, true, [])
100100
}
@@ -120,7 +120,7 @@ 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.Bind {
123+
if v.Extern {
124124
ret nil
125125
}
126126
doc.Name = v.Name
@@ -131,14 +131,14 @@ impl Builder {
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.Bind {
134+
if f.Extern {
135135
ret nil
136136
}
137137
doc.Name = f.Name
138138
doc.Owner = doc::Func
139139
| &ast::Struct:
140140
s := node.Data.(&ast::Struct)
141-
if s.Bind {
141+
if s.Extern {
142142
ret nil
143143
}
144144
doc.Name = s.Name
@@ -157,7 +157,7 @@ impl Builder {
157157
doc.Owner = doc::TypeEnum
158158
| &ast::TypeAlias:
159159
a := node.Data.(&ast::TypeAlias)
160-
if a.Bind {
160+
if a.Extern {
161161
ret nil
162162
}
163163
doc.Name = a.Name

builder/formatter.jule

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -486,8 +486,8 @@ impl formatter {
486486
self.directives(d.Directives)
487487
self.buf.Write(self.indent)!
488488
}
489-
if d.Bind {
490-
self.write("cpp ")
489+
if d.Extern {
490+
self.write("extern ")
491491
}
492492
if d.Unsafe {
493493
self.write("unsafe ")
@@ -593,8 +593,8 @@ impl formatter {
593593
self.write("\n")
594594
}
595595
}
596-
if d.Bind {
597-
self.write("cpp ")
596+
if d.Extern {
597+
self.write("extern ")
598598
}
599599
self.write("struct ")
600600
self.write(d.Name)
@@ -672,8 +672,8 @@ impl formatter {
672672
}
673673

674674
fn typeAliasDecl(&self, mut d: &ast::TypeAlias) {
675-
if d.Bind {
676-
self.write("cpp ")
675+
if d.Extern {
676+
self.write("extern ")
677677
}
678678
self.write("type ")
679679
self.write(d.Name)
@@ -698,8 +698,8 @@ impl formatter {
698698
if len(d.Directives) != 0 {
699699
self.directives(d.Directives)
700700
}
701-
if d.Bind {
702-
self.write("cpp let ")
701+
if d.Extern {
702+
self.write("extern let ")
703703
} else {
704704
if d.Static {
705705
self.write("let ")
@@ -1392,8 +1392,8 @@ impl exprFormatter {
13921392
}
13931393

13941394
fn name(&self, id: &ast::NameExpr) {
1395-
if id.Bind {
1396-
self.write("cpp.")
1395+
if id.Extern {
1396+
self.write("extern.")
13971397
}
13981398
self.write(id.Name)
13991399
}

0 commit comments

Comments
 (0)