Robert Krimen
7163cd7841
Skip unexported fields, begin json.Marshaler support
...
* The "reflect" package is willing to expose unexported fields in structs (a little suprising).
* Skip unexported fields when enumerating or trying to access (pretend they don't exist).
* Allow structs that implement json.Marshaler to work as expected in a JSON.stringify call.
If we let the runtime try to access unexported fields, it'll cause a panic.
This fixes #64
2014-04-12 11:53:04 -07:00
Robert Krimen
6e3ed1b99d
Tighten test comparisons instead of squashing everything to a string
2014-04-11 18:06:18 -07:00
Robert Krimen
ad8a97c028
New parser
...
* Faster, more straightforward, etc.
* More advanced object literals (get ..., set ...)
* More tests using JavaScript from the wild (http://cdnjs.com/ )
2014-04-10 20:42:25 -07:00
Tim Jurcka
805a4c27b1
Fix redundant evaluation of test in "for" (sdgoij/MatrixFrog)
...
This fixes #39
2014-01-19 09:08:47 -08:00
Robert Krimen
42d674a81b
Embiggen test for #24
...
Make sure we get back out what we put in.
2013-06-09 18:58:35 -07:00
Robert Krimen
30e4c4b96d
Fix .ToValue([]string{...}).Export() to return []string{...}
...
This fixes #24
2013-06-06 20:18:37 -07:00
Robert Krimen
04ea4a2729
Prevent otto.Value from becoming a _goStructObject
...
Fix #21 , this would happen during .Set(...)
2013-06-05 21:52:59 -07:00
Robert Krimen
7e2b4f2063
Rewrite of property handling to be more robust and compliant
...
* No more _stash
* Now using a "virtual table" system via _objectClass
* Make Array.concat GoArray compatible (via .isArray())
Fix #16
2013-05-12 14:14:51 -07:00
Robert Krimen
149f94f9fb
Fix that we were using a non-runtime toValue method with go_array, go_map, and go_struct
...
This will fix #13
2013-04-30 00:36:46 +02:00
Robert Krimen
9184233705
Bundle terst dependency (github.com/robertkrimen/terst)
2013-04-15 10:20:34 -07:00
Robert Krimen
260b2a48bf
Fix (band-aid) Go/JavaScript cross-boundary error transformation
2013-03-06 12:07:26 -08:00
Robert Krimen
d0132833fb
SyntaxError => ReferenceError
2013-03-06 11:58:39 -08:00
Robert Krimen
20d2e8bba6
gofmt
...
Ugh.
2013-01-25 09:59:42 -08:00
Robert Krimen
7982fa0fac
Fix scanning \r, \b, \f, \v as \t
...
Copy and paste error of epic proportions?
This will fix #5
2012-10-17 18:57:48 -07:00