Skip to content

Commit e6f8c89

Browse files
committed
juledoc: update to latest AST
1 parent ec63248 commit e6f8c89

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

builder/commentmap.jule

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ fn BuildCommentMap(mut &tokens: []&token::Token): &CommentMap {
6363
mut i := 0
6464
for i < len(tokens) {
6565
token := tokens[i]
66-
if token.Id != token::COMMENT {
66+
if token.ID != token::COMMENT {
6767
i++
6868
continue
6969
}

builder/formatter.jule

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -252,9 +252,9 @@ impl formatter {
252252
match {
253253
| i == 0:
254254
self.write(" ")
255-
| arg.Id != token::RPAREN &&
256-
d.Args[i-1].Id != token::LPAREN &&
257-
d.Args[i-1].Id != token::NOT:
255+
| arg.ID != token::RPAREN &&
256+
d.Args[i-1].ID != token::LPAREN &&
257+
d.Args[i-1].ID != token::NOT:
258258
self.write(" ")
259259
}
260260
self.write(arg.Kind)
@@ -670,7 +670,7 @@ impl formatter {
670670
self.write("let ")
671671
} else if d.Const {
672672
self.write("const ")
673-
} else if d.Op == nil || d.Op.Id == token::DEFINE {
673+
} else if d.Op == nil || d.Op.ID == token::DEFINE {
674674
self.write("let ")
675675
}
676676
}
@@ -1667,15 +1667,15 @@ impl binaryFormatter {
16671667
// prec mode is on
16681668

16691669
// write space if operator is not precedenced
1670-
if binaryFormatter.opPrec(self.bin.Op.Id) == 0 {
1670+
if binaryFormatter.opPrec(self.bin.Op.ID) == 0 {
16711671
self.write(" ")
16721672
}
16731673
}
16741674

16751675
fn head(&self, mut &bin: &ast::BinaryExpr) {
16761676
self.ef.fmt.popRowCommentsByC(bin.X.Token.Row, bin.X.Token.Column, false)
16771677
self.format(bin.X)
1678-
self.op = binaryFormatter.isOp(bin.Op.Id)
1678+
self.op = binaryFormatter.isOp(bin.Op.ID)
16791679
self.writeSpace()
16801680
self.ef.fmt.popRowCommentsByC(bin.Op.Row, bin.Op.Column, false)
16811681
self.write(bin.Op.Kind)
@@ -1716,7 +1716,7 @@ impl binaryFormatter {
17161716
match type kind {
17171717
| &ast::BinaryExpr:
17181718
mut bin := kind.(&ast::BinaryExpr)
1719-
if binaryFormatter.isHardZipOp(bin.Op.Id) {
1719+
if binaryFormatter.isHardZipOp(bin.Op.ID) {
17201720
ret true
17211721
}
17221722
ret self.isZip(bin.X.Data) || self.isZip(bin.Y.Data)
@@ -1729,7 +1729,7 @@ impl binaryFormatter {
17291729
match type kind {
17301730
| &ast::BinaryExpr:
17311731
bin := kind.(&ast::BinaryExpr)
1732-
if first != binaryFormatter.opPrec(bin.Op.Id) {
1732+
if first != binaryFormatter.opPrec(bin.Op.ID) {
17331733
ret -1
17341734
}
17351735
mut prec := self.isPrec(first, bin.X.Data)
@@ -1751,7 +1751,7 @@ impl binaryFormatter {
17511751
ret
17521752
}
17531753
// detect zip
1754-
if binaryFormatter.isOp(bin.Op.Id) {
1754+
if binaryFormatter.isOp(bin.Op.ID) {
17551755
self.zip = true
17561756
ret
17571757
}
@@ -1764,7 +1764,7 @@ impl binaryFormatter {
17641764
// detect prec
17651765
if !self.prec {
17661766
// enable prec formatting if all operators is not have same prec
1767-
first := binaryFormatter.opPrec(bin.Op.Id)
1767+
first := binaryFormatter.opPrec(bin.Op.ID)
17681768
self.prec = first != self.isPrec(first, bin.X.Data) || first != self.isPrec(first, bin.Y.Data)
17691769
}
17701770
}
@@ -1794,7 +1794,7 @@ impl binaryFormatter {
17941794
|:
17951795
// enable zip mode if prec mode is enabled and
17961796
// current binary operator have high precedence
1797-
self.zip = self.zip || self.prec && binaryFormatter.opPrec(self.bin.Op.Id) == 1
1797+
self.zip = self.zip || self.prec && binaryFormatter.opPrec(self.bin.Op.ID) == 1
17981798

17991799
// disable prec mode for non-tail expressions
18001800
self.prec = false

0 commit comments

Comments
 (0)