Changeset 1702
- Timestamp:
- 10/23/08 12:54:47 (3 months ago)
- Location:
- cobra/trunk
- Files:
-
- 4 modified
-
Developer/IntermediateReleaseNotes.text (modified) (1 diff)
-
Source/CobraParser.cobra (modified) (1 diff)
-
Source/SharpGenerator.cobra (modified) (1 diff)
-
Tests/100-basics/307-enums.cobra (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
cobra/trunk/Developer/IntermediateReleaseNotes.text
r1700 r1702 1 1 Post 0.8 2 3 * Added storage type specification for enums: 4 .code 5 enum Foo 6 of uint64 7 Bar 8 Baz 2 9 3 10 * Added new install-from-workspace command in the Source directory. This makes installing out of a Subversion workspace very easy and reliable. Documentation is in the doc string at the top of InstallFromWorkspace.cobra. -
cobra/trunk/Source/CobraParser.cobra
r1678 r1702 951 951 isNames = .isDeclNames 952 952 attribs = .hasAttribs 953 if . peek.which=='OF'953 if .optional('OF') 954 954 storageType = .typeId to ? 955 955 docString = .docString -
cobra/trunk/Source/SharpGenerator.cobra
r1701 r1702 835 835 storageType = _storageType 836 836 if storageType and storageType is not .compiler.intType 837 sw.write(' [storageType.sharpRef]') 837 # Cannot say UInt64 because: 838 # C# error: Type byte, sbyte, short, ushort, int, uint, long, or ulong expected 839 st = storageType to IntType 840 branch st.size 841 on 8, t = 'byte' 842 on 16, t = 'short' 843 on 32, t = 'int' 844 on 64, t = 'long' 845 else, throw FallThroughException(st) 846 if not st.isSigned, t = 'u' + t 847 sw.write(' : [t]') 838 848 sw.write(' {\n') 839 849 sw.indent -
cobra/trunk/Tests/100-basics/307-enums.cobra
r1294 r1702 1 1 enum Medium 2 of uint64 2 3 air 3 4 land
