diff --git a/decode.go b/decode.go index 369ee26..6b15618 100644 --- a/decode.go +++ b/decode.go @@ -172,7 +172,7 @@ func (d *Decoder) addHeadOrLineCommentToMap(node ast.Node) { } texts := []string{} targetLine := node.GetToken().Position.Line - minCommentLine := math.MaxInt64 + minCommentLine := math.MaxInt for _, comment := range commentGroup.Comments { if minCommentLine > comment.Token.Position.Line { minCommentLine = comment.Token.Position.Line diff --git a/scanner/scanner.go b/scanner/scanner.go index 616e868..444b8e9 100644 --- a/scanner/scanner.go +++ b/scanner/scanner.go @@ -141,7 +141,7 @@ func (s *Scanner) newLineCount(src []rune) int { } func (s *Scanner) updateIndentState(ctx *Context) { - indentNumBasedIndentState := s.indentState + var indentNumBasedIndentState IndentState if s.prevIndentNum < s.indentNum { s.indentLevel = s.prevIndentLevel + 1 indentNumBasedIndentState = IndentStateUp