Support suffixes for literals #749

Closed
nddrylliog opened this Issue Dec 6, 2013 · 1 comment

Projects

None yet

1 participant

@nddrylliog
Member

See "The type of the literal" section in there: http://en.cppreference.com/w/cpp/language/integer_literal

@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.
871e2b6
@nddrylliog nddrylliog closed this Dec 8, 2013
@nddrylliog
Member

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