Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support suffixes for literals #749

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

Support suffixes for literals #749

nddrylliog opened this issue Dec 6, 2013 · 1 comment

Comments

@nddrylliog
Copy link
Member

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

@ghost ghost assigned nddrylliog Dec 6, 2013
nddrylliog added a commit to ooc-lang/nagaqueen that referenced this issue Dec 8, 2013
nddrylliog added a commit that referenced this issue Dec 8, 2013
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
Copy link
Member Author

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
Projects
None yet
Development

No branches or pull requests

1 participant