refactor compiler. support nested expressions and print