GeezerVison is showing github.com — Extends AST type replacements with remaining primitive types. · hellcoderz/java2python@764be76
File treeExpand file treeCollapse file tree Open diff view settings Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: java2python/config/default.py +8-8Lines changed: 8 additions & 8 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 148 | 148 | (Type('TRUE'), transform.true2True), | 149 | 149 | (Type('IDENT'), transform.keywordSafeIdent), | 150 | 150 |
| | 151 | + (Type('FLOATING_POINT_LITERAL'), transform.syntaxSafeFloatLiteral), | 151 | 152 |
| 152 | | - (Type('FLOATING_POINT_LITERAL'), | 153 | | - transform.syntaxSafeFloatLiteral), | 154 | | - | 155 | | - (Type('TYPE') > Type('BOOLEAN'), | 156 | | - transform.typeSub), | 157 | | - | 158 | | - (Type('TYPE') > Type('DOUBLE'), | 159 | | - transform.typeSub), | | 153 | + (Type('TYPE') > Type('BOOLEAN'), transform.typeSub), | | 154 | + (Type('TYPE') > Type('BYTE'), transform.typeSub), | | 155 | + (Type('TYPE') > Type('CHAR'), transform.typeSub), | | 156 | + (Type('TYPE') > Type('DOUBLE'), transform.typeSub), | | 157 | + (Type('TYPE') > Type('SHORT'), transform.typeSub), | 160 | 158 |
| 161 | 159 | (Type('TYPE') > Type('QUALIFIED_TYPE_IDENT') > Type('IDENT'), | 162 | 160 | transform.typeSub), | | 202 | 200 | 'boolean' : 'bool', | 203 | 201 | 'IndexOutOfBoundsException' : 'IndexError', | 204 | 202 | 'Integer' : 'int', | | 203 | + 'short' : 'int', | | 204 | + 'byte' : 'int', | 205 | 205 | 'Object' : 'object', | 206 | 206 | 'String' : 'str', | 207 | 207 | 'char' : 'str', | |
Collapse file Copy file name to clipboard +17Lines changed: 17 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
| | 1 | +class BasicTypes1 { | | 2 | + char chr; | | 3 | + byte byt; | | 4 | + short shr; | | 5 | + int in_t; | | 6 | + long lng; | | 7 | + float flt; | | 8 | + double dbl; | | 9 | + | | 10 | + public static void main(String[] args) { | | 11 | + BasicTypes1 bt1 = new BasicTypes1(); | | 12 | + System.out.println(bt1.byt); | | 13 | + System.out.println(bt1.shr); | | 14 | + System.out.println(bt1.in_t); | | 15 | + } | | 16 | + | | 17 | +} |
|