vendor: update dependencies with github.com/kardianos/govendor

This commit is contained in:
Felix Lange
2017-02-16 13:21:11 +01:00
parent c8695fae35
commit 2c4455b12a
168 changed files with 3394 additions and 6327 deletions

View File

@ -1,5 +0,0 @@
/.test
/otto/otto
/otto/otto-*
/test/test-*.js
/test/tester

View File

@ -114,7 +114,7 @@ http://godoc.org/github.com/robertkrimen/otto/parser
Parse and return an AST
```go
filenamee := "" // A filename is optional
filename := "" // A filename is optional
src := `
// Sample xyzzy example
(function(){

View File

@ -70,7 +70,7 @@ func digitValue(chr rune) int {
}
func builtinGlobal_parseInt(call FunctionCall) Value {
input := strings.TrimSpace(call.Argument(0).string())
input := strings.Trim(call.Argument(0).string(), builtinString_trim_whitespace)
if len(input) == 0 {
return NaNValue()
}
@ -153,7 +153,8 @@ var parseFloat_matchValid = regexp.MustCompile(`[0-9eE\+\-\.]|Infinity`)
func builtinGlobal_parseFloat(call FunctionCall) Value {
// Caveat emptor: This implementation does NOT match the specification
input := strings.TrimSpace(call.Argument(0).string())
input := strings.Trim(call.Argument(0).string(), builtinString_trim_whitespace)
if parseFloat_matchBadSpecial.MatchString(input) {
return NaNValue()
}

View File

@ -380,7 +380,12 @@ func builtinString_split(call FunctionCall) Value {
split = split[:limit]
}
return call.runtime.toValue(split)
valueArray := make([]Value, len(split))
for index, value := range split {
valueArray[index] = toValue_string(value)
}
return toValue_object(call.runtime.newArrayOf(valueArray))
}
}

View File

@ -4,6 +4,7 @@ import (
"fmt"
"math"
"reflect"
"unicode/utf16"
)
func (value Value) bool() bool {
@ -32,6 +33,8 @@ func (value Value) bool() bool {
return true
case string:
return 0 != len(value)
case []uint16:
return 0 != len(utf16.Decode(value))
}
if value.IsObject() {
return true

View File

@ -11,7 +11,7 @@ import (
var stringToNumberParseInteger = regexp.MustCompile(`^(?:0[xX])`)
func parseNumber(value string) float64 {
value = strings.TrimSpace(value)
value = strings.Trim(value, builtinString_trim_whitespace)
if value == "" {
return 0