Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate fullmoon parser to version 1.1.0 #219

Merged
merged 3 commits into from
Oct 19, 2024
Merged

Conversation

jeparlefrancais
Copy link
Contributor

@jeparlefrancais jeparlefrancais commented Oct 15, 2024

Closes #153. Closes #125.

This PR update the underlying parser to its latest version, which brings new syntax like leading symbols for union and intersection types (like & string & number) and compound assignments using floor division (//=).

This upgrade should also make the parser less prone to reported stack overflow issues.

Note: I discovered an issue with union and intersection types that uses a leading symbol in some cases. I left some notes in Kampfkarren/full-moon#311.

  • add entry to the changelog

Copy link

Coverage after merging upgrade-fullmoon-v1 into main will be

86.93%

Coverage Report for Changed Files
FileStmtsBranchesFuncsLinesUncovered Lines
src
   ast_converter.rs88.05%100%90.99%87.91%1013, 1037, 1057–1059, 1080, 1101, 1118, 1122–1125, 1139, 1158, 1178, 1193, 1218, 1235, 1256, 1275–1277, 1294, 1322, 1356, 1371, 1387–1389, 1399, 1404–1406, 1421, 1441, 1572–1574, 1635–1637, 1688–1690, 1714–1717, 1752–1754, 1782–1784, 1788–1790, 1851–1852, 1878–1880, 1887–1889, 1907–1909, 1933–1935, 2005, 2010–2012, 2032, 2038–2040, 2045–2047, 2072–2074, 2094, 2151–2153, 2177–2179, 218, 2180, 219–220, 2210–2212, 2218–2220, 2223–2225, 2287–2289, 2301–2303, 2307–2309, 2323, 2330, 2345, 235–237, 2374, 2457–2459, 2487–2489, 2510–2512, 2542–2544, 2560, 2564, 2588–2590, 2602–2604, 2624–2626, 265–267, 2681–2683, 2715, 2737–2743, 3054–3061, 3063–3070, 3072–3083, 3092, 3094–3099, 3101–3106, 3109, 3135–3137, 3148–3150, 3168–3170, 488–490, 494–496, 604, 619–621, 656–658, 666, 680, 695–697, 701–703, 718–720, 724, 733–735, 776, 787–789, 795–797, 816, 840, 927, 931–933
   parser.rs87.23%100%94.12%86.29%21–22, 29–30, 524–530, 69–73, 85
src/generator
   dense.rs88.53%100%93.41%88.07%1012–1018, 1032–1034, 1052–1056, 1064, 1073–1074, 1079, 1085, 1094–1102, 1119, 1141, 1154–1157, 1161–1164, 159–160, 162, 176–177, 179, 253–265, 267–273, 275–276, 287–289, 368, 417, 50, 507, 51–55, 57–59, 61, 614–616, 62–63, 65–68, 685, 69, 704, 75–76, 80, 897, 942, 959, 986–993
   mod.rs98.65%100%100%98.55%354, 370, 374
   readable.rs97.24%100%99.03%97.08%1122, 1173–1177, 1197–1198, 1229, 1274–1276, 1343, 1370, 1400, 180, 185–186, 190, 203–204, 209, 214, 232–233, 413, 46, 48–51, 53, 655–656
   token_based.rs91.80%100%94.68%91.54%1016–1017, 1031–1033, 1056–1057, 1066–1068, 1087–1088, 1097–1099, 113, 1150–1154, 130, 1309, 131, 1379, 1416–1424, 147–148, 1500–1509, 1534–1536, 1568–1577, 160–161, 1621, 1679, 182–183, 203–205, 2076, 2135–2136, 2162–2166, 2195–2199, 2419, 2423, 2436, 245, 297–301, 371–372, 378, 390, 450–451, 473–474, 490–491, 533, 621–622, 655–656, 724–725, 763–767, 80, 808–812, 830–831, 84, 853–855, 919–920, 929–930, 937, 952, 957–961, 980–981, 994–995
src/nodes/expressions
   binary.rs94.27%100%100%93.73%57, 67–69, 71–73, 77–82, 91
src/nodes/types
   function.rs91.91%100%94.59%91.18%169–177, 52–54
   intersection.rs83.65%100%78.95%84.71%62–64, 67–69, 90–95
   optional.rs100%100%100%100%
   parenthese.rs88.89%100%87.50%89.29%50–52
   type_name.rs80%100%77.78%80.58%104–106, 114–116, 144–146, 162–164, 33–34, 48–50, 89–91
   union.rs82.83%100%77.78%83.95%52–54, 57–59, 85–90
src/process
   visitors.rs99.07%100%100%98.99%92–97
src/process/evaluator
   mod.rs88.09%100%98.18%86.87%100–101, 162, 174, 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
src/rules/bundle/path_require_mode
   module_definitions.rs78.54%100%75.51%78.93%105–109, 114, 133, 277–278, 296–297, 317, 321, 327–328, 336, 340–344, 346, 349–351, 353, 356–373, 376–378, 380, 423–425, 47–50, 53–56, 72, 78–79

@jeparlefrancais jeparlefrancais merged commit 3d0a234 into main Oct 19, 2024
6 checks passed
@jeparlefrancais jeparlefrancais deleted the upgrade-fullmoon-v1 branch October 19, 2024 12:29
@jeparlefrancais jeparlefrancais mentioned this pull request Oct 19, 2024
jackTabsCode pushed a commit to jackTabsCode/darklua that referenced this pull request Oct 27, 2024
This PR update the underlying parser to its latest version, which brings
new syntax like leading symbols for union and intersection types (like
`& string & number`) and compound assignments using floor division
(`//=`).

This upgrade should also make the parser less prone to reported stack
overflow issues.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support floor division thread 'main' has overflowed its stack.
1 participant