Changes to support #29 - Support multi-line literal strings
* Added error output to test_program.go * Added multi-line literal string support to lexer * Added multi-line string supprt to lexer * Added unit-test for new string support * Modified test.sh to take an optional parameter to run an individual BurntSushi test suite. * Fixed formatting
This commit is contained in:
@@ -13,10 +13,12 @@ import (
|
||||
func main() {
|
||||
bytes, err := ioutil.ReadAll(os.Stdin)
|
||||
if err != nil {
|
||||
log.Fatalf("Error during TOML read: %s", err)
|
||||
os.Exit(2)
|
||||
}
|
||||
tree, err := toml.Load(string(bytes))
|
||||
if err != nil {
|
||||
log.Fatalf("Error during TOML load: %s", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
@@ -24,6 +26,7 @@ func main() {
|
||||
|
||||
if err := json.NewEncoder(os.Stdout).Encode(typedTree); err != nil {
|
||||
log.Fatalf("Error encoding JSON: %s", err)
|
||||
os.Exit(3)
|
||||
}
|
||||
|
||||
os.Exit(0)
|
||||
|
||||
Reference in New Issue
Block a user