all: fix build-tools

pull/9855/head
Alexander Medvednikov 2021-04-23 15:10:14 +03:00
parent 0567cbe431
commit 9b14f71631
3 changed files with 8 additions and 6 deletions

View File

@ -1,5 +1,7 @@
-## V 0.2.4 -## V 0.2.4
-*Not yet released* -*Not yet released*
- Improved `unused variable` warning. Assigning to a variable no longer marks it as used.
- Bare metal support.
## V 0.2.2 - 0.2.3 ## V 0.2.2 - 0.2.3
*22 Jan 2021* *22 Jan 2021*

View File

@ -306,7 +306,7 @@ pub fn (mut d Doc) file_ast(file_ast ast.File) map[string]DocNode {
} }
} }
mut preceeding_comments := []DocComment{} mut preceeding_comments := []DocComment{}
mut imports_section := true // mut imports_section := true
for sidx, stmt in stmts { for sidx, stmt in stmts {
if stmt is ast.ExprStmt { if stmt is ast.ExprStmt {
// Collect comments // Collect comments
@ -338,7 +338,7 @@ pub fn (mut d Doc) file_ast(file_ast ast.File) map[string]DocNode {
d.head.comments << preceeding_comments d.head.comments << preceeding_comments
} }
preceeding_comments = [] preceeding_comments = []
imports_section = false // imports_section = false
} }
if stmt is ast.Import { if stmt is ast.Import {
continue continue

View File

@ -1089,7 +1089,7 @@ pub fn (mut f Fmt) global_decl(node ast.GlobalDecl) {
} }
f.write('__global ') f.write('__global ')
mut max := 0 mut max := 0
mut has_assign := false // mut has_assign := false
if node.is_block { if node.is_block {
f.writeln('(') f.writeln('(')
f.indent++ f.indent++
@ -1097,9 +1097,9 @@ pub fn (mut f Fmt) global_decl(node ast.GlobalDecl) {
if field.name.len > max { if field.name.len > max {
max = field.name.len max = field.name.len
} }
if field.has_expr { // if field.has_expr {
has_assign = true // has_assign = true
} //}
} }
} }
for field in node.fields { for field in node.fields {