hashicorp / hcl2

Former temporary home for experimental new version of HCL
https://github.com/hashicorp/hcl
Mozilla Public License 2.0
373 stars 66 forks source link

Allow leading underscores in identifiers #19

Closed apparentlymart closed 6 years ago

apparentlymart commented 6 years ago

HCL2 uses the unicode definition of identifiers, which permits underscores only in the ID_Continue portion, and not in ID_Start.

It is a reasonable expectation from other languages that identifiers can begin with an underscore, so we'll extend the unicode definition here to include underscore in ID_Start, in similar vein to how we extended ID_Continue to include dashes.

apparentlymart commented 6 years ago

Addressed in 061412b83ab5459b9d949a125759d31706728959.