equal
deleted
inserted
replaced
427 val literals = let |
427 val literals = let |
428 fun char_scala c = if c = "'" then "\\'" |
428 fun char_scala c = if c = "'" then "\\'" |
429 else if c = "\"" then "\\\"" |
429 else if c = "\"" then "\\\"" |
430 else if c = "\\" then "\\\\" |
430 else if c = "\\" then "\\\\" |
431 else let val k = ord c |
431 else let val k = ord c |
432 in if k < 32 orelse k > 126 then "\\" ^ radixstring (8, "0", k) else c end |
432 in if k < 32 orelse k > 126 |
|
433 then "\\u" ^ align_right "0" 4 (radixstring (8, "0", k)) else c end |
433 fun numeral_scala k = |
434 fun numeral_scala k = |
434 if ~2147483647 < k andalso k <= 2147483647 |
435 if ~2147483647 < k andalso k <= 2147483647 |
435 then signed_string_of_int k |
436 then signed_string_of_int k |
436 else quote (signed_string_of_int k) |
437 else quote (signed_string_of_int k) |
437 in Literals { |
438 in Literals { |