Skip to content

Commit dc5fa5e

Browse files
committed
fix: add more implicit tests to lexer
1 parent 21049e9 commit dc5fa5e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

internal/lexer/lexer.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ var nonText = map[string]bool{
1717
// this forces the lexer to not treat at as TEXT
1818
// and enter the switch statement of the state machine
1919
// NOTE: when a new implementation is added we should add it here
20-
// AWS|AZure|GCP...
20+
// AWS|AZure
2121
"A": true,
2222
// VAULT (HashiCorp)
2323
"V": true,
@@ -96,7 +96,7 @@ func (l *Lexer) NextToken() config.Token {
9696
if found, literal, imp := l.peekIsBeginOfToken([]config.ImplementationPrefix{config.GcpSecretsPrefix}, "GC"); found {
9797
tok = config.Token{Type: config.BEGIN_CONFIGMANAGER_TOKEN, Literal: literal, ImpPrefix: imp}
9898
} else {
99-
// it is not a marker AW as text
99+
// it is not a marker - GC literal as text
100100
tok = config.Token{Type: config.TEXT, Literal: "GC"}
101101
}
102102
} else {

internal/parser/parser_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ func Test_ParserBlocks(t *testing.T) {
5353
},
5454
},
5555
"tokens touching each other in source": {
56-
`foo stuyfsdfsf
56+
`foo stuyfsdfsf GCFOO VAbarAWbuX AZmore
5757
foo=AWSPARAMSTR:///pathAWSSECRETS:///foo
5858
other text her
5959
BAR=something

0 commit comments

Comments
 (0)