goccmack / gocc

Parser / Scanner Generator
Other
618 stars 48 forks source link

Move TODOs out of generated code #101

Closed skius closed 3 years ago

skius commented 3 years ago

Fixes #100.

I'm not entirely sure where to move the TODOs and how to make sure it's clear what they reference, so I just tried something.

(Offtopic, don't know where to ask: are you still adding projects to the Users section of the readme? Would be happy to add skius/stringlang :))

awalterschulze commented 3 years ago

Yes please create another pull request to add your project to the readme :D Always great to share more users.

awalterschulze commented 3 years ago

Would you mind running make regenerate? I assume that these comments were generated in some examples that would also show up in the diff, but I don't see them.

skius commented 3 years ago

Would you mind running make regenerate? I assume that these comments were generated in some examples that would also show up in the diff, but I don't see them.

Running make regenerate on my fork and branch replaces many imports of this repo with my fork, am I doing something wrong?


diff --git a/example/astx/lexer/acttab.go b/example/astx/lexer/acttab.go
index 6f9994f..89a7793 100755
--- a/example/astx/lexer/acttab.go
+++ b/example/astx/lexer/acttab.go
@@ -5,7 +5,7 @@ package lexer
 import (
        "fmt"

-       "github.com/goccmack/gocc/example/astx/token"
+       "github.com/skius/gocc/example/astx/token"
 )```
skius commented 3 years ago

FWIW: There are also still some references to "Users/marius/prj/go/src/gocc/internal/test/t1/errors" in the tests lying around that cause make test to fail, I reckon they were introduced due to a similar reason.

awalterschulze commented 3 years ago

I only see marius a latex file, do you maybe have a link? https://github.com/goccmack/gocc/search?q=marius

awalterschulze commented 3 years ago

To run make generate you have to clone the repo under $GOPATH/src/github.com/goccmack/gocc only simply move it there after cloning. Does that make sense?

skius commented 3 years ago

I only see marius a latex file, do you maybe have a link? https://github.com/goccmack/gocc/search?q=marius

https://github.com/goccmack/gocc/blob/master/internal/test/t1/errors/errors.go and https://github.com/goccmack/gocc/blob/master/internal/test/t1/parser/parser.go

skius commented 3 years ago

To run make generate you have to clone the repo under $GOPATH/src/github.com/goccmack/gocc only simply move it there after cloning. Does that make sense?

It worked, but you should probably take a closer look at the commit since quite a few things were changed.

EDIT: References to marius were also fixed in the latest commit

awalterschulze commented 3 years ago

I only see marius a latex file, do you maybe have a link? https://github.com/goccmack/gocc/search?q=marius

https://github.com/goccmack/gocc/blob/master/internal/test/t1/errors/errors.go and https://github.com/goccmack/gocc/blob/master/internal/test/t1/parser/parser.go

Nice catch, those are definitely bugs, we should fix :)

awalterschulze commented 3 years ago

Seems travis is not doing its job anymore and we should really switch to github actions https://github.com/goccmack/gocc/issues/99

awalterschulze commented 3 years ago

I have taken a closer look and all looks good to me. Thank you for making this fix <3 Great work :D