diff options
| author | Bruce Hill <bitbucket@bruce-hill.com> | 2018-08-29 15:02:36 -0700 |
|---|---|---|
| committer | Bruce Hill <bitbucket@bruce-hill.com> | 2018-08-29 15:03:03 -0700 |
| commit | 23b52bc22d9ec24702c1bed0f8ce90271eec6460 (patch) | |
| tree | ad30c4d7da4fe2f0cb328ea5c0da883ec91ac641 /compatibility/compatibility.nom | |
| parent | e64632be1aa938c865d06acfcf6641b75ecb42ac (diff) | |
Intermediate step in upgrading to 3.6. Fixed a bug with upgrading
methods.
Diffstat (limited to 'compatibility/compatibility.nom')
| -rw-r--r-- | compatibility/compatibility.nom | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/compatibility/compatibility.nom b/compatibility/compatibility.nom index 86a5ac7..d74cabe 100644 --- a/compatibility/compatibility.nom +++ b/compatibility/compatibility.nom @@ -1,4 +1,4 @@ -#!/usr/bin/env nomsu -V3.5.5.6 +#!/usr/bin/env nomsu -V3.6.5.6 # This file contains code for defining ways to upgrade code between different versions of Nomsu. @@ -33,20 +33,22 @@ compile [upgrade action %actions to %version as %body] to: return %replacements.(%t.1) ..else: return ".." - \(%t.type)(\(quote "\(%t.source)"), \(..) + \(%t.type){source=\(quote "\(%t.source)"), \(..) quote "\(%t.1) \000\(=lua "string.format('%X', __MANGLE_INDEX)")" - ..) + ..} (%t is syntax tree): %args = ((make tree %) for % in %t) - add "\(\%tree as lua id).source" to %args at index 1 - return "\(%t.type)(\(%args joined with ", "))" + add "source=\(\%tree as lua id).source" to %args at index 1 + if %t.target: + add "target=\(make tree %t.target)" to %args at index 1 + return "\(%t.type){\(%args joined with ", ")}" else: return (quote "\%t") - unless ("\%lua" == ""): to %lua write "\n" - to %lua write (..) + unless ("\%lua" == ""): %lua::append "\n" + %lua::append (..) Lua ".." A_upgrade_action_1_to_2_via_3(\(quote %action.stub), \(%version as lua expr), function(\(..) \%tree as lua id |
