From 24a44ffdd6e5648b3e0528ac3ccc871da853158c Mon Sep 17 00:00:00 2001 From: Tim Foley Date: Tue, 11 Jul 2017 15:43:18 -0700 Subject: Make parser recovering more robust to avoid infinite loops Fixes #75 In order to avoid cascaded errors, I went ahead and made the parser refuse to skip past a `}` in recovery mode. The problem with this is that we fail to make forward progress if we are stuck on a `}` (this happens if you have an extra `}` at the global scope. --- tests/bugs/gh-75.hlsl.expected | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 tests/bugs/gh-75.hlsl.expected (limited to 'tests/bugs/gh-75.hlsl.expected') diff --git a/tests/bugs/gh-75.hlsl.expected b/tests/bugs/gh-75.hlsl.expected new file mode 100644 index 000000000..345acd804 --- /dev/null +++ b/tests/bugs/gh-75.hlsl.expected @@ -0,0 +1,6 @@ +result code = -1 +standard error = { +tests/bugs/gh-75.hlsl(24): error 20001: unexpected '}', expected identifier +} +standard output = { +} -- cgit v1.2.3