Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
7e22ee4
models
chlowell Nov 2, 2024
eedae6c
structs look okay
chlowell Nov 15, 2024
fc23941
interfaces
chlowell Nov 8, 2024
d68fd51
enums look okay
chlowell Nov 15, 2024
a9d09f6
whitespace
chlowell Nov 12, 2024
25d971c
funcs look okay
chlowell Nov 13, 2024
61fabc5
clean up TODOs
chlowell Nov 14, 2024
5a4b375
dead code
chlowell Nov 14, 2024
f85c785
LineID for packages
chlowell Nov 15, 2024
4eda23e
separate packages with a line
chlowell Nov 15, 2024
f49d7c3
exclude spacing tokens from diffs
chlowell Nov 15, 2024
6d32d34
fixing tests
chlowell Nov 16, 2024
918df46
comprehensive output test
chlowell Nov 15, 2024
4fb6fdd
explicit declaration types
chlowell Nov 16, 2024
a9c4a3d
remove duplicate types for resolved aliases
chlowell Nov 18, 2024
4681caf
remove redundant blank lines
chlowell Nov 18, 2024
7f305ae
remove space in empty param list
chlowell Nov 18, 2024
d64198d
better test name
chlowell Nov 20, 2024
fdc4ef7
tidying
chlowell Nov 20, 2024
84fb1a2
remove invalid nav links
chlowell Nov 22, 2024
a3423ba
update APIViewWeb Go parser version
chlowell Nov 25, 2024
0cc7ce2
Mark line seperator as end of context for package
praveenkuttappan Nov 27, 2024
5ba53cf
commentary
chlowell Nov 26, 2024
4b14d44
always end contexts with a sibling line
chlowell Dec 2, 2024
a4db377
more tests
chlowell Dec 2, 2024
8e686a5
remove extraneous newlines after declarations
chlowell Dec 2, 2024
390f381
parseStruct**s**
chlowell Dec 2, 2024
071b90f
lint
chlowell Dec 2, 2024
de8afd8
add a newline to output.json
chlowell Dec 2, 2024
e3c819c
nevermind the newline
chlowell Dec 5, 2024
a5b0b7d
actually we can have the newline; we must normalize line endings anyway
chlowell Dec 5, 2024
42fd35d
commentary
chlowell Dec 6, 2024
ed517b5
delete unneeded helper
chlowell Dec 6, 2024
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
funcs look okay
  • Loading branch information
chlowell committed Nov 20, 2024
commit 25d971cda4238064539e003701c45013466425f6
6 changes: 4 additions & 2 deletions src/go/cmd/content.go
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,8 @@ func isExampleOrTest(s string) bool {
return strings.Contains(s, "Example") || strings.Contains(s, "Test")
}

func (c *content) parseFunc(tokenList *[]ReviewToken) {
func (c *content) parseFunc() []ReviewLine {
lns := []ReviewLine{}
keys := make([]string, 0, len(c.Funcs))
for key, fn := range c.Funcs {
name := fn.Name()
Expand All @@ -553,8 +554,9 @@ func (c *content) parseFunc(tokenList *[]ReviewToken) {
}
sort.Strings(keys)
for _, k := range keys {
*tokenList = append(*tokenList, c.Funcs[k].MakeTokens()...)
lns = append(lns, c.Funcs[k].MakeReviewLine())
}
return lns
}

// generateNavChildItems will loop through all the consts, interfaces, structs and global functions
Expand Down
2 changes: 1 addition & 1 deletion src/go/cmd/review.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ func (r *Review) Review() (CodeFile, error) {
line.Children = append(line.Children, p.c.parseSimpleType()...)
line.Children = append(line.Children, p.c.parseVar()...)
line.Children = append(line.Children, p.c.parseConst()...)
// p.c.parseFunc(tokens)
line.Children = append(line.Children, p.c.parseFunc()...)
navItems := p.c.generateNavChildItems()
nav = append(nav, NavigationItem{
Text: n,
Expand Down