diff --git a/.gitignore b/.gitignore index 476408b..005c580 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,5 @@ node_modules build -queries npm-debug.log .env .DS_Store -tmp diff --git a/example/example.hcl b/example/example.hcl new file mode 100644 index 0000000..00e4249 --- /dev/null +++ b/example/example.hcl @@ -0,0 +1,35 @@ +// comment +# comment +/* + comment +*/ + +resource_1 "strlit1" "strlit2" { + attr1 = "val1" + tupl1 = [ 1, 2, 3.4, "foo" ] + tupl2 = [] + obj1 = { foo = "baz" } + null1 = null + bool1 = true + bool2 = false + splat1 = tuple.*.foo.bar[0] + splat2 = tuple[*].foo.bar[0] + for1 = { for i, v in ["a", "a", "b"] : v => i... } + for2 = [ for k, v in local.list : "${k}-${v}" ] + for3 = [ for k in local.list : k ] + for4 = { for i in local.list : i => i } + for5 = { for k, v in local.map : k => v } + for6 = [ for i in local.list : i if i < 3 ] + func1 = is_number("123") + cond1 = pred() ? 1 : "foobar" + esc1 = "\" \t \UFF11FF22 \uFFFF \n" + + nested_resource_1 { + attr1 = 2 + attr2 = 2.112 + attr3 = 2.112e-12 + attr4 = 2.112e+12 + attr5 = 2.112E+12 + attr6 = 2.112E-12 + } +}