diff options
Diffstat (limited to 'lib/tools/replace.nom')
| -rwxr-xr-x | lib/tools/replace.nom | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/tools/replace.nom b/lib/tools/replace.nom index aea1b03..fe07140 100755 --- a/lib/tools/replace.nom +++ b/lib/tools/replace.nom @@ -1,5 +1,4 @@ #!/usr/bin/env nomsu -V7.0.0 - ### This is a tool to replace syntax trees with something new. @@ -63,6 +62,7 @@ command line program with $args: ..else: $substitution_values.($patt.1) = $tree return $substitution_values + ($tree.type != $patt.type): return (nil) ($tree.type == "Action"): if (($tree, get stub) != ($patt, get stub)): return (nil) @@ -135,6 +135,7 @@ command line program with $args: if ($user_answers.$t == "n"): return (nil) $replaced.$t = (yes) return $ret + $tree2 = ($tree with replacements) if $args.i: if (#$user_answers > 0): say "" @@ -145,4 +146,4 @@ command line program with $args: if (#$replaced > 0): write "\($tree2 as nomsu)" to file $filename ..else: - say ($tree2 as nomsu) + say ($tree2 as nomsu)
\ No newline at end of file |
