*Canned coconut milk will cause syrup to separate when stored, so shake syrup to combine before using. Or substitute the ½ cup canned coconut milk and ½ cup water with 1 cup coconut milk beverage brand, like Silk or So Delicious.
Whisk sugar, coconut milk and water together in a small saucepan. Bring mixture to a boil, stirring to make sure sugar dissolves, and cook for 1 to 2 min. Remove from heat and add lime leaves and and star anise. Cover and allow mixture to steep until room temperature, about 20 min. Strain and store in a sealed container in the refrigerator. Use within 2 weeks.