Support suffixes for literals #749

nddrylliog opened this Issue Dec 6, 2013 · 1 comment


None yet

1 participant


See "The type of the literal" section in there:

@nddrylliog nddrylliog was assigned Dec 6, 2013
@nddrylliog nddrylliog added a commit to ooc-lang/nagaqueen that referenced this issue Dec 8, 2013
@nddrylliog nddrylliog Syntax changes for ooc-lang/rock#749 032654f
@nddrylliog nddrylliog added a commit that referenced this issue Dec 8, 2013
@nddrylliog nddrylliog Closes #749. Suffix-less fp literals are Double
Issue #749 is about supporting suffixes in int and float literals. To
align with C/C++, float literals are now of type 'Double' by default,
and you need the suffix 'f' to turn them into 'Float's. The 'l' suffix
turns them into 'LDouble's.
@nddrylliog nddrylliog closed this Dec 8, 2013

Note that this has a huge performance impact for rock, since now the 'Int', etc. types have to be resolved each individually. We could have a pool of types that are re-used, that would be hackish but work..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment