Commit Graph

1232 Commits

Author SHA1 Message Date
Mitchell Hashimoto 3fc289c4d2 hcl: test parsing an empty file 2014-09-15 09:38:43 -07:00
Mitchell Hashimoto 86d22484a4 hcl: can parse empty file with just a comment 2014-09-14 19:59:36 -07:00
Mitchell Hashimoto 9b5d9eb9b0 hcl: fix scenario where infinite loop happens 2014-09-07 16:18:56 -07:00
Mitchell Hashimoto a0a5d2873e hcl: identifiers can have '-' 2014-08-28 17:03:42 -07:00
Mitchell Hashimoto 71e25b33f0 Fix broken parsing case 2014-08-28 16:56:08 -07:00
Mitchell Hashimoto 982cf1ff35 hcl: stop number if whitespace
/cc @sbinet - The issue was in the lexer. It was seeing:

1.2e-10
e =

As:

1.2e-10e
2014-08-22 12:29:30 -07:00
Mitchell Hashimoto 11de47961f Merge pull request #7 from gonuts/dev/complete-scientific-notation
all: first stab at full scientific notation support
2014-08-22 12:24:02 -07:00
Sebastien Binet 8438e17f49 all: first stab to full scientific notation support 2014-08-22 10:34:03 +02:00
Mitchell Hashimoto 26239b8eab hcl: support heredocs [GH-6] 2014-08-21 14:54:13 -07:00
Mitchell Hashimoto 8a779f6e41 json: support \n 2014-08-21 14:42:02 -07:00
Mitchell Hashimoto f65d314d58 hcl: support variable interpolations for compat with libucl 2014-08-21 14:38:45 -07:00
Mitchell Hashimoto c6802d3070 Actually decode list of objects properly in JSON 2014-08-21 14:02:29 -07:00
Mitchell Hashimoto 65159dc252 Don't double-nest lists of objects 2014-08-21 13:32:31 -07:00
Mitchell Hashimoto 2b53be2ffe Update README 2014-08-21 11:29:54 -07:00
Mitchell Hashimoto b9f494b747 hcl: support scientific notation 2014-08-21 11:29:33 -07:00
Mitchell Hashimoto e868ca02fd Support decoding floats, scientific notation for JSON [GH-5] 2014-08-21 11:22:37 -07:00
Mitchell Hashimoto b699557f16 Decode into proper arrays of things, add many test cases
/cc @armon - This changes how Consul has to define its structure. Ping
me tomorrow to learn more, but going to leave it here for reference too:

The Consul case (there is a test case) never worked even with go-libucl,
because there is an ambiguity of whether you want the inner children or
the array of outer elements (the slice in the Policy struct).

I've added a new modifier you can specify with a tag called "expand"
which will tell hcl to expand the value to its children for decoding.
You can see me use it in the test case which verifies that the Consul
ACLs parse.
2014-08-17 23:50:44 -07:00
Mitchell Hashimoto 0cb0fcb714 Merge pull request #1 from kaleworsley/patch-1
`continue` -> `contain`
2014-08-12 17:48:49 -07:00
Kale Worsley 601de91d2d `continue` -> `contain`. 2014-08-13 12:39:04 +12:00
Mitchell Hashimoto 21b17881bd Fix infinite loop in decodeMap 2014-08-11 21:49:12 -07:00
Mitchell Hashimoto 1a9d040ea4 Support Elem on lists 2014-08-11 21:33:44 -07:00
Mitchell Hashimoto bf89042e7b hcl: Elem on nil should return nil 2014-08-11 21:11:00 -07:00
Mitchell Hashimoto 99d585c297 Tests pass. 2014-08-11 20:58:20 -07:00
Mitchell Hashimoto 719a177dba decoding structs a bit 2014-08-11 16:51:52 -07:00
Mitchell Hashimoto 61e6b8179b decoding maps works 2014-08-11 16:38:36 -07:00
Mitchell Hashimoto f340e2e557 compiles, all tests failing 2014-08-11 16:33:28 -07:00
Mitchell Hashimoto e704c5b624 json: parses 2014-08-11 16:23:28 -07:00
Mitchell Hashimoto a3b46cc5d6 hcl: use new Object structure 2014-08-11 16:13:24 -07:00
Mitchell Hashimoto a4f0365393 Failing test 2014-08-11 14:19:35 -07:00
Mitchell Hashimoto abf09ef1a5 Update README.md 2014-08-11 09:58:13 -07:00
Mitchell Hashimoto 0b07544203 convert types for type aliases 2014-08-08 16:07:08 -07:00
Mitchell Hashimoto 437eb0d851 decode JSON equally 2014-08-08 15:58:34 -07:00
Mitchell Hashimoto 61bd5db85c Fix consul test case 2014-08-08 15:16:42 -07:00
Mitchell Hashimoto 95d9b2e530 Decoding into a slice with a non-list should make list 2014-08-08 14:59:28 -07:00
Mitchell Hashimoto a9d6287a6e hcl: support empty lists 2014-08-04 22:45:47 -07:00
Mitchell Hashimoto bc2f8e57ee support decoding bools 2014-08-04 22:25:59 -07:00
Mitchell Hashimoto 0d84234df1 hcl: support booleans 2014-08-04 22:23:11 -07:00
Mitchell Hashimoto 398c583f25 hcl,json: fix list and object ordering 2014-08-04 21:53:39 -07:00
Mitchell Hashimoto 33c2953c5b hcl: set the key 2014-08-04 09:27:50 -07:00
Mitchell Hashimoto 481bfbf3c0 hcl: continue to simplify hcl ast 2014-08-03 22:02:57 -07:00
Mitchell Hashimoto 783acc2aa1 ObjectNodes can only have assignments 2014-08-03 21:56:50 -07:00
Mitchell Hashimoto a095771be9 case insensitive Get 2014-08-03 17:57:54 -07:00
Mitchell Hashimoto 8c0a6c555f hcl: negative numbers and floats 2014-08-03 17:33:29 -07:00
Mitchell Hashimoto 2e6ea6c71c decode list of structs 2014-08-03 17:24:37 -07:00
Mitchell Hashimoto ae8e4f9b5e Decode into pointers 2014-08-03 17:17:17 -07:00
Mitchell Hashimoto daed1fd01d decoder can decode into structures 2014-08-03 14:06:18 -07:00
Mitchell Hashimoto d3d3f86887 hcl: docs 2014-08-03 13:45:46 -07:00
Mitchell Hashimoto 42dabeb54f hcl: remove the tests for AST structure 2014-08-03 13:43:34 -07:00
Mitchell Hashimoto 5c7a923e39 Update README 2014-08-03 13:40:22 -07:00
Mitchell Hashimoto 9e89ffabde json: can parse negative numbers and floats 2014-08-03 13:34:08 -07:00