File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -160,6 +160,7 @@ contexts:
160160 - include : functions
161161 - include : parens
162162 - include : identifiers
163+ - include : illegal-strays
163164
164165 comma :
165166 - match : \,
@@ -517,7 +518,6 @@ contexts:
517518 # https://github.com/hashicorp/hcl2/blob/master/hcl/hclsyntax/spec.md#collection-values
518519 object-value :
519520 - include : comments
520- - include : expressions
521521 - match : \,
522522 comment : Pop scope on comma.
523523 scope : punctuation.separator.terraform
@@ -529,6 +529,7 @@ contexts:
529529 comment : Lookahead (don't consume) and pop scope on a bracket.
530530 scope : punctuation.section.braces.end.terraform
531531 pop : 1
532+ - include : expressions
532533
533534 # Attribute Access: "." Identifier
534535 #
@@ -692,6 +693,10 @@ contexts:
692693 - match : ' {{identifier}}'
693694 scope : variable.other.readwrite.terraform
694695
696+ illegal-strays :
697+ - match : ' [\])}]'
698+ scope : invalid.illegal.stray.python
699+
695700 # Blocks: Identifier (StringLit|Identifier)* "{" Newline Body "}" Newline;
696701 #
697702 # https://github.com/hashicorp/hcl2/blob/master/hcl/hclsyntax/spec.md#structural-elements
Original file line number Diff line number Diff line change @@ -3439,3 +3439,12 @@ resource "aws_iam_role_policy" "attach-inline-policy-1" {
34393439 ]
34403440 })
34413441}
3442+
3443+ ]
3444+ # <- invalid.illegal.stray.python
3445+
3446+ }
3447+ # <- invalid.illegal.stray.python
3448+
3449+ )
3450+ # <- invalid.illegal.stray.python
You can’t perform that action at this time.
0 commit comments