Skip to content

Commit

Permalink
fixing weird attribute name stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
davydotcom committed Feb 9, 2024
1 parent 6054c09 commit 47a1789
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ dependencies {

## What's New

* **0.7.7** HCL Periods in attribute names referenced from Unicodes ID_Continue, fixed.
* **0.7.6** SLF4j 1.7.36 upgrade to reduce CVE's
* **0.7.5** For Tuple with boolean conditionals as value expression did not work before
* **0.7.4** Fixing Array Access via tree traversal i.e. local.my_array.0 vs local.my_array[0]
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ ext {


group = 'com.bertramlabs.plugins'
version = '0.7.6'
version = '0.7.7'

ext.isReleaseVersion = !version.endsWith("SNAPSHOT")
sourceCompatibility = "1.8"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ ForInExpression = in
DigitValue = [0-9\.\-]+
WholeNumber = [0-9]+

HCLAttributeName = [:jletter:] [a-zA-Z0-9\-\_]*
HCLAttributeName = [:jletter:] [a-zA-Z0-9\-\_\.]*
HCLQuotedPropertyName = [\"] [^\r\n]+ [\"]

HCLBlock = {HCLAttributeName} {HCLBlockAttribute}* "{" [^]* "}" | {HCLAttributeName} {WhiteSpaceOpt} "{" [^]* "}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,13 +188,15 @@ test = {"list": [1,2,3,[4,5,6]], name: "David Estes", info: { firstName: "David"
def hcl = '''
resource xxx "images" {
default = "empty.jpg"
default.withperiod = "period.jpg"
}
'''
HCLParser parser = new HCLParser();
when:
def results = parser.parse(hcl)
then:
results.resource.xxx.images.default == "empty.jpg"
results.resource.xxx.images["default.withperiod"] == "period.jpg"
}


Expand Down

0 comments on commit 47a1789

Please sign in to comment.