Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 349343 - Extensible way to choose the type of a literal
Summary: Extensible way to choose the type of a literal
Status: CLOSED WONTFIX
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: EDT (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard: Extensibility_Compile
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-14 12:41 EDT by Matt Heitz CLA
Modified: 2017-02-23 14:17 EST (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matt Heitz CLA 2011-06-14 12:41:47 EDT
Different compilers may need to assign different types to a literal.  For example, in RBD the literal 12345 is of type int (because the length is > 4 and < 10) but in EDT its type is smallint (because it can be stored in a smallint variable).  When RBD's code is based on EDT, we need a way for the RBD compiler to insert its own rules about the types of literals.  Other generators may find this useful as well.
Comment 1 Brian Svihovec CLA 2011-12-16 15:33:12 EST
Tim, should this be considered for the .8 release?
Comment 2 Justin Spadea CLA 2012-06-19 13:51:48 EDT
Is this still relevant now that we let the user specify specific types to be attached to the literals? e.g. '123F' to make it a float literal.
Comment 3 Matt Heitz CLA 2012-06-19 14:19:13 EDT
This is only relevant if we plan to use the EDT compiler to compile code written in RBD.  But I don't think we'll do that.  It seems more likely that we'd write a new compiler for RBD code, and that compiler will be free to do whatever it wants with the literals.