seaofvoices / darklua

A command line tool that transforms Lua code
https://darklua.com/
MIT License
78 stars 10 forks source link

Support floor division in binary expressions #155

Closed jeparlefrancais closed 9 months ago

jeparlefrancais commented 9 months ago

Related to #153

This PR adds support for the new floor division operator in binary expressions.

Right now, full-moon does not support this operator in the context of compound assignments (full-moon#292), so I'll leave the issue opened until darklua completely supports it.

github-actions[bot] commented 9 months ago

Coverage after merging binary-floor-division into main will be

87.00%

Coverage Report for Changed Files
FileStmtsBranchesFuncsLinesUncovered Lines
src
   ast_converter.rs88.51%100%90%88.44%1003, 1027, 1039, 1071, 1088, 1092–1095, 1109, 1128, 1148, 1163, 1188, 1205, 1226, 1245–1247, 1264, 1292, 1326, 1341, 1357–1359, 1369, 1374–1376, 1391, 1411, 1542–1544, 1605–1607, 1658–1660, 1684–1687, 1722–1724, 1752–1754, 1758–1760, 1820–1821, 1847–1849, 1856–1858, 1876–1878, 1902–1904, 1970, 1975–1977, 1997, 2003–2005, 2010–2012, 2040–2042, 2066, 2102, 212, 2120–2122, 213–214, 2146–2149, 2179–2181, 2192–2194, 2256–2258, 2270–2272, 2276–2278, 229–231, 2312, 2395–2397, 2425–2427, 2448–2450, 2480–2482, 2498, 2502, 2526–2528, 2540–2542, 2564–2566, 259–261, 2621–2623, 2654, 2686–2689, 2729–2733, 2777, 2970, 3046–3053, 3055–3062, 3064–3075, 3084, 3086–3091, 3094, 3120–3122, 3133–3135, 3155–3157, 478–480, 484–486, 594, 609–611, 646–648, 656, 670, 685–687, 691–693, 708–710, 714, 723–725, 766, 777–779, 785–787, 806, 830, 917, 921–923
   parser.rs99.14%100%73.33%99.38%37, 43, 507–513, 55–59, 66
src/nodes/expressions
   binary.rs96.12%100%100%95.57%57–59, 67–69, 71–73, 77–78, 87
src/nodes/statements
   compound_assign.rs83.93%100%72%87.36%101–103, 22, 35
src/process/evaluator
   mod.rs93.32%100%95%93.17%100–101, 162, 174, 179, 185, 196, 205–207, 213–215, 217–219, 221–222, 225, 237–239, 251–255, 259–260, 262–264, 304, 325, 339, 363, 366, 399, 405–406, 411, 425, 428, 446, 549, 58–60, 71, 810