Updated Vendoring

It resolves issues #474 and #589 which were coming from libcompose,
as well as resolves #440 and #437 partially as `group_add` & `stop_grace_period`
are supported by libcompose now.
This commit is contained in:
Suraj Narwade
2017-05-15 18:28:03 +05:30
parent 7ddce35dd5
commit 7f00fec328
78 changed files with 1454 additions and 1772 deletions
+2 -2
View File
@@ -89,7 +89,7 @@ func (d *decoder) decode(name string, node ast.Node, result reflect.Value) error
switch k.Kind() {
case reflect.Bool:
return d.decodeBool(name, node, result)
case reflect.Float64:
case reflect.Float32, reflect.Float64:
return d.decodeFloat(name, node, result)
case reflect.Int, reflect.Int32, reflect.Int64:
return d.decodeInt(name, node, result)
@@ -143,7 +143,7 @@ func (d *decoder) decodeFloat(name string, node ast.Node, result reflect.Value)
return err
}
result.Set(reflect.ValueOf(v))
result.Set(reflect.ValueOf(v).Convert(result.Type()))
return nil
}
}
+6
View File
@@ -3,6 +3,7 @@
package parser
import (
"bytes"
"errors"
"fmt"
"strings"
@@ -36,6 +37,11 @@ func newParser(src []byte) *Parser {
// Parse returns the fully parsed source and returns the abstract syntax tree.
func Parse(src []byte) (*ast.File, error) {
// normalize all line endings
// since the scanner and output only work with "\n" line endings, we may
// end up with dangling "\r" characters in the parsed data.
src = bytes.Replace(src, []byte("\r\n"), []byte("\n"), -1)
p := newParser(src)
return p.Parse()
}