lojikil / coastML

a tiny experimental ML dialect combining Yeti & CarML
ISC License
12 stars 0 forks source link

Incorrectly formatted characters in Python output #7

Closed lojikil closed 1 year ago

lojikil commented 1 year ago

When closing #6 I switched around how literals were printed (not in the same commit, but in that thread of commits). This however changed how characters were generated:

% cat blah.coast 
f = '=';
g = 'g';
print f;
print g
% ./coastml python blah.coast
# pythonizing: blah.coast
from dataclasses import dataclass
import functools
import itertools

f = =
g = g
print(f)
print(g)

Fix is easy, just need to add something to the literal generator for characters.