Skip to content

Commit

Permalink
test: more test cases for printer
Browse files Browse the repository at this point in the history
  • Loading branch information
silverhairs committed Jul 28, 2023
1 parent 4b18579 commit 400d0b9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions glox/ast/print_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@ func TestPrint(t *testing.T) {
OrElseOperator: token.Token{Type: token.COLON, Lexeme: ":", Line: 1},
OrElse: &Literal{Value: 2},
},
&Literal{Value: "yes"},
&Variable{Name: token.Token{Type: token.IDENTIFIER, Lexeme: "number", Line: 1}},
&Assignment{
Name: token.Token{Type: token.IDENTIFIER, Lexeme: "number", Line: 1},
Value: NewLiteralExpression(12),
},
}
printer := NewPrinter()

Expand Down

0 comments on commit 400d0b9

Please sign in to comment.