mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-20 08:47:28 +01:00
Add {cmd,lib}/dumbindent
This commit is contained in:
1 parent
b2dc84105a
commit
d8cd72798a
3 files changed
+408
No files matched your search
@@ -30,6 +30,7 @@ import (
|
||||
|
||||
"github.com/google/wuffs/lang/builtin"
|
||||
"github.com/google/wuffs/lang/generate"
|
||||
"github.com/google/wuffs/lib/dumbindent"
|
||||
|
||||
cf "github.com/google/wuffs/cmd/commonflags"
|
||||
|
||||
@@ -200,6 +201,8 @@ func Do(args []string) error {
|
||||
// C code, so further C formatting is unnecessary (and not costless).
|
||||
if (*cformatterFlag == "") || (pkgName == "base") {
|
||||
return unformatted, nil
|
||||
} else if *cformatterFlag == "dumbindent" {
|
||||
return dumbindent.Format(unformatted)
|
||||
}
|
||||
|
||||
stdout := &bytes.Buffer{}
|
||||
|
||||
Reference in new issue
Block a user