diff options
Diffstat (limited to 'Tools')
-rw-r--r-- | Tools/buildbot/build-amd64.bat | 5 | ||||
-rw-r--r-- | Tools/buildbot/clean-amd64.bat | 5 | ||||
-rw-r--r-- | Tools/buildbot/external-amd64.bat | 3 | ||||
-rw-r--r-- | Tools/buildbot/external.bat | 3 | ||||
-rw-r--r-- | Tools/buildbot/test-amd64.bat | 6 | ||||
-rw-r--r-- | Tools/parser/unparse.py | 39 |
6 files changed, 39 insertions, 22 deletions
diff --git a/Tools/buildbot/build-amd64.bat b/Tools/buildbot/build-amd64.bat deleted file mode 100644 index f77407b..0000000 --- a/Tools/buildbot/build-amd64.bat +++ /dev/null @@ -1,5 +0,0 @@ -@rem Formerly used by the buildbot "compile" step.
-@echo This script is no longer used and may be removed in the future.
-@echo To get the same effect as this script, use
-@echo PCbuild\build.bat -d -e -k -p x64
-call "%~dp0build.bat" -p x64 %*
diff --git a/Tools/buildbot/clean-amd64.bat b/Tools/buildbot/clean-amd64.bat deleted file mode 100644 index b53c7c1..0000000 --- a/Tools/buildbot/clean-amd64.bat +++ /dev/null @@ -1,5 +0,0 @@ -@rem Formerly used by the buildbot "clean" step.
-@echo This script is no longer used and may be removed in the future.
-@echo To get the same effect as this script, use `clean.bat` from this
-@echo directory and pass `-p x64` as two arguments.
-call "%~dp0clean.bat" -p x64 %*
diff --git a/Tools/buildbot/external-amd64.bat b/Tools/buildbot/external-amd64.bat deleted file mode 100644 index bfaef05..0000000 --- a/Tools/buildbot/external-amd64.bat +++ /dev/null @@ -1,3 +0,0 @@ -@echo This script is no longer used and may be removed in the future.
-@echo Please use PCbuild\get_externals.bat instead.
-@"%~dp0..\..\PCbuild\get_externals.bat" %*
diff --git a/Tools/buildbot/external.bat b/Tools/buildbot/external.bat deleted file mode 100644 index bfaef05..0000000 --- a/Tools/buildbot/external.bat +++ /dev/null @@ -1,3 +0,0 @@ -@echo This script is no longer used and may be removed in the future.
-@echo Please use PCbuild\get_externals.bat instead.
-@"%~dp0..\..\PCbuild\get_externals.bat" %*
diff --git a/Tools/buildbot/test-amd64.bat b/Tools/buildbot/test-amd64.bat deleted file mode 100644 index e48329c..0000000 --- a/Tools/buildbot/test-amd64.bat +++ /dev/null @@ -1,6 +0,0 @@ -@rem Formerly used by the buildbot "test" step.
-@echo This script is no longer used and may be removed in the future.
-@echo To get the same effect as this script, use
-@echo PCbuild\rt.bat -q -d -x64 -uall -rwW
-@echo or use `test.bat` in this directory and pass `-x64` as an argument.
-call "%~dp0test.bat" -x64 %*
diff --git a/Tools/parser/unparse.py b/Tools/parser/unparse.py index c828577..9972797 100644 --- a/Tools/parser/unparse.py +++ b/Tools/parser/unparse.py @@ -322,6 +322,45 @@ class Unparser: def _Str(self, tree): self.write(repr(tree.s)) + def _JoinedStr(self, t): + self.write("f") + string = io.StringIO() + self._fstring_JoinedStr(t, string.write) + self.write(repr(string.getvalue())) + + def _FormattedValue(self, t): + self.write("f") + string = io.StringIO() + self._fstring_FormattedValue(t, string.write) + self.write(repr(string.getvalue())) + + def _fstring_JoinedStr(self, t, write): + for value in t.values: + meth = getattr(self, "_fstring_" + type(value).__name__) + meth(value, write) + + def _fstring_Str(self, t, write): + value = t.s.replace("{", "{{").replace("}", "}}") + write(value) + + def _fstring_FormattedValue(self, t, write): + write("{") + expr = io.StringIO() + Unparser(t.value, expr) + expr = expr.getvalue().rstrip("\n") + if expr.startswith("{"): + write(" ") # Separate pair of opening brackets as "{ {" + write(expr) + if t.conversion != -1: + conversion = chr(t.conversion) + assert conversion in "sra" + write(f"!{conversion}") + if t.format_spec: + write(":") + meth = getattr(self, "_fstring_" + type(t.format_spec).__name__) + meth(t.format_spec, write) + write("}") + def _Name(self, t): self.write(t.id) |