Goto statements with a bad label produces error message.

Now it also produces a short list of suggestions based on string distance.
This commit is contained in:
Nipunn Koorapati
2012-04-20 14:42:14 -04:00
parent db8b08131f
commit 040421942f
5 changed files with 51 additions and 3 deletions

6
tests_errors/goto-5.ispc Normal file
View File

@@ -0,0 +1,6 @@
void func(int x) {
completelydifferentlabel:
goto label;
}

9
tests_errors/goto-6.ispc Normal file
View File

@@ -0,0 +1,9 @@
void func(int x) {
libel:
babel:
lbel:
label2:
goto label;
}