640445e163
The TemplateStringLiteral production was not quite right, causing a literal $ or % immediately followed by " to consume the quotes and any following characters on the line if there were any more characters on the line. Now we match things more precisely, but at the expense of generating some redundant extra tokens when escapes and literal dollar/percent signs are present. Those extra tokens don't matter in practice because the resulting strings get concatenated together anyway, which is proven by the fact that this changeset includes changes only to the scanner and parser tests, and not to any of the expression result tests. While here, I also improved the error message for when the user attempts to split a quoted string over multiple lines. Previously it was just using the generic "invalid character" message, which isn't particularly actionable. Now we'll give the user a couple options of what to do instead.
33 lines
1.4 KiB
Modula-2
33 lines
1.4 KiB
Modula-2
// WARNING: This module will move to a new path when it transitions from
|
|
// being "experimental" to being released.
|
|
module github.com/hashicorp/hcl2
|
|
|
|
require (
|
|
github.com/agext/levenshtein v1.2.1
|
|
github.com/apparentlymart/go-dump v0.0.0-20180507223929-23540a00eaa3
|
|
github.com/apparentlymart/go-textseg v1.0.0
|
|
github.com/bsm/go-vlq v0.0.0-20150828105119-ec6e8d4f5f4e
|
|
github.com/davecgh/go-spew v1.1.1
|
|
github.com/go-test/deep v1.0.1
|
|
github.com/google/go-cmp v0.2.0
|
|
github.com/hashicorp/errwrap v0.0.0-20180715044906-d6c0cd880357 // indirect
|
|
github.com/hashicorp/go-multierror v0.0.0-20180717150148-3d5d8f294aa0
|
|
github.com/kr/pretty v0.1.0
|
|
github.com/kylelemons/godebug v0.0.0-20170820004349-d65d576e9348
|
|
github.com/mitchellh/go-wordwrap v0.0.0-20150314170334-ad45545899c7
|
|
github.com/onsi/ginkgo v1.7.0 // indirect
|
|
github.com/onsi/gomega v1.4.3 // indirect
|
|
github.com/pmezard/go-difflib v1.0.0 // indirect
|
|
github.com/sergi/go-diff v1.0.0
|
|
github.com/spf13/pflag v1.0.2
|
|
github.com/stretchr/testify v1.2.2 // indirect
|
|
github.com/zclconf/go-cty v0.0.0-20190426224007-b18a157db9e2
|
|
golang.org/x/crypto v0.0.0-20190426145343-a29dc8fdc734
|
|
golang.org/x/net v0.0.0-20190502183928-7f726cade0ab // indirect
|
|
golang.org/x/sync v0.0.0-20190423024810-112230192c58 // indirect
|
|
golang.org/x/sys v0.0.0-20190502175342-a43fa875dd82 // indirect
|
|
golang.org/x/text v0.3.2 // indirect
|
|
gopkg.in/yaml.v2 v2.2.2
|
|
howett.net/plist v0.0.0-20181124034731-591f970eefbb
|
|
)
|