Download
67 lines 2.1 KiBNomsuModified 2019-03-27 raw
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
#!/usr/bin/env nomsu -V7.0.0
###
    This file defines upgrades from Nomsu <4.8.10 to 4.8.10 (renaming "action" -> "means")
use "compatibility/compatibility"

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

upgrade action "local action" to "4.8.10" via
    for $tree:
        $spec = $tree.3
        $body = $tree.4
        if $spec.type is:
            "List":
                if (#$spec == 1):
                    return \(\$spec.1 means \$body)
                ..else:
                    return \(\$spec all mean \$body)
            
            else:
                return \(\$spec means \$body)

upgrade action "action" to "4.8.10" via
    for $tree:
        $spec = $tree.2
        $body = $tree.3
        if $body:
            if $spec.type is:
                "List":
                    if (#$spec == 1):
                        return \(externally \$spec.1 means \$body)
                    ..else:
                        return \(externally \$spec all mean \$body)
                
                else:
                    return \(externally \$spec means \$body)
        ..else:
            return \((\$spec)'s meaning)

upgrade action "compile 1 to" to "4.8.10" via
    for $tree:
        $spec = $tree.2
        $body = $tree.4
        if $spec.type is:
            "List":
                if (#$spec == 1):
                    return \(\$spec.1 compiles to \$body)
                ..else:
                    return \(\$spec all compile to \$body)
            
            else:
                return \(\$spec compiles to \$body)

upgrade action "parse 1 as" to "4.8.10" via
    for $tree:
        $spec = $tree.2
        $body = $tree.4
        if $spec.type is:
            "List":
                if (#$spec == 1):
                    return \(\$spec.1 parses as \$body)
                ..else:
                    return \(\$spec all parse as \$body)
            
            else:
                return \(\$spec parse as \$body)

upgrade action (compile as $) to "4.8.10" as (what $ compiles to)
upgrade action (remove action $) to "4.8.10" as (($'s meaning) = (nil))