File tree Expand file tree Collapse file tree 5 files changed +20
-9
lines changed Expand file tree Collapse file tree 5 files changed +20
-9
lines changed Original file line number Diff line number Diff line change @@ -981,12 +981,23 @@ public class ExportSwift {
981981 rawValue = stringLiteral. segments. first? . as ( StringSegmentSyntax . self) ? . content. text
982982 } else if let boolLiteral = element. rawValue? . value. as ( BooleanLiteralExprSyntax . self) {
983983 rawValue = boolLiteral. literal. text
984- } else if let intLiteral = element. rawValue? . value. as ( IntegerLiteralExprSyntax . self) {
985- rawValue = intLiteral. literal. text
986- } else if let floatLiteral = element. rawValue? . value. as ( FloatLiteralExprSyntax . self) {
987- rawValue = floatLiteral. literal. text
988984 } else {
989- rawValue = nil
985+ var numericExpr = element. rawValue? . value
986+ var isNegative = false
987+ if let prefixExpr = numericExpr? . as ( PrefixOperatorExprSyntax . self) ,
988+ prefixExpr. operator. text == " - "
989+ {
990+ numericExpr = prefixExpr. expression
991+ isNegative = true
992+ }
993+
994+ if let intLiteral = numericExpr? . as ( IntegerLiteralExprSyntax . self) {
995+ rawValue = isNegative ? " - \( intLiteral. literal. text) " : intLiteral. literal. text
996+ } else if let floatLiteral = numericExpr? . as ( FloatLiteralExprSyntax . self) {
997+ rawValue = isNegative ? " - \( floatLiteral. literal. text) " : floatLiteral. literal. text
998+ } else {
999+ rawValue = nil
1000+ }
9901001 }
9911002 } else {
9921003 rawValue = nil
Original file line number Diff line number Diff line change 2828}
2929
3030@JS enum Priority : Int32 {
31- case lowest = 1
31+ case lowest = - 1
3232 case low = 2
3333 case medium = 3
3434 case high = 4
Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ export enum TSHttpStatus {
3737}
3838
3939export const PriorityValues : {
40- readonly Lowest : 1 ;
40+ readonly Lowest : - 1 ;
4141 readonly Low : 2 ;
4242 readonly Medium : 3 ;
4343 readonly High : 4 ;
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ export const TSHttpStatus = {
3434} ;
3535
3636export const PriorityValues = {
37- Lowest : 1 ,
37+ Lowest : - 1 ,
3838 Low : 2 ,
3939 Medium : 3 ,
4040 High : 4 ,
Original file line number Diff line number Diff line change 178178
179179 ],
180180 "name" : " lowest" ,
181- "rawValue" : " 1"
181+ "rawValue" : " - 1"
182182 },
183183 {
184184 "associatedValues" : [
You can’t perform that action at this time.
0 commit comments