-
Notifications
You must be signed in to change notification settings - Fork 105
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Alex Levinson
committed
Feb 27, 2018
1 parent
ec36ed4
commit ebc557f
Showing
3 changed files
with
23 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// +build !windows | ||
|
||
package compiler | ||
|
||
import ( | ||
"os" | ||
|
||
"github.com/alecthomas/chroma/quick" | ||
) | ||
|
||
func PrettyPrintSource(source string) { | ||
quick.Highlight(os.Stdout, source, "go", "terminal", "vim") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
// +build windows | ||
|
||
package compiler | ||
|
||
import "fmt" | ||
|
||
func PrettyPrintSource(source string) { | ||
fmt.Println(source) | ||
} |