Remove colons from the normal lexer
This commit is contained in:
parent
e9b8055f58
commit
9fee7c831b
2
lex.go
2
lex.go
@ -55,8 +55,6 @@ func (x *hclLex) Lex(yylval *hclSymType) int {
|
||||
}
|
||||
|
||||
switch c {
|
||||
case ':':
|
||||
return COLON
|
||||
case ',':
|
||||
return COMMA
|
||||
case '=':
|
||||
|
14
lex_test.go
14
lex_test.go
@ -24,20 +24,6 @@ func TestLex(t *testing.T) {
|
||||
lexEOF,
|
||||
},
|
||||
},
|
||||
{
|
||||
"assign_colon.hcl",
|
||||
[]int{
|
||||
IDENTIFIER, EQUAL, LEFTBRACKET, LEFTBRACE,
|
||||
STRING, COLON, LEFTBRACE,
|
||||
STRING, COLON, LEFTBRACE, RIGHTBRACE, COMMA,
|
||||
STRING, COLON, LEFTBRACKET,
|
||||
NUMBER, COMMA, NUMBER, COMMA, STRING,
|
||||
RIGHTBRACKET, COMMA,
|
||||
RIGHTBRACE,
|
||||
RIGHTBRACE, RIGHTBRACKET,
|
||||
lexEOF,
|
||||
},
|
||||
},
|
||||
{
|
||||
"list.hcl",
|
||||
[]int{
|
||||
|
Loading…
Reference in New Issue
Block a user