Skip to content

Implemented "textDocument/formatter" #40

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Dec 18, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Added DebugLogAll function in sketch mapper
  • Loading branch information
cmaglie committed Dec 18, 2020
commit af2c223107d22e5ba8c0a2709bd309ec898a8ecf
11 changes: 11 additions & 0 deletions handler/sourcemapper/ino.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"bufio"
"bytes"
"fmt"
"log"
"sort"
"strconv"
"strings"
Expand Down Expand Up @@ -331,3 +332,13 @@ func dumpInoToCppMap(s map[InoLine]int) {
fmt.Printf("%s:%d -> %d\n", inoLine.File, inoLine.Line, cppLine)
}
}

// DebugLogAll dumps the internal status of the mapper
func (s *InoMapper) DebugLogAll() {
cpp := strings.Split(s.CppText.Text, "\n")
log.Printf(" > Current sketchmapper content:")
for l, cppLine := range cpp {
inoFile, inoLine := s.CppToInoLine(l)
log.Printf(" %3d: %-40s : %s:%d", l, cppLine, inoFile, inoLine)
}
}