Skip to content

Instantly share code, notes, and snippets.

@pcwalton
Created June 17, 2010 19:06
Show Gist options
  • Save pcwalton/442595 to your computer and use it in GitHub Desktop.
Save pcwalton/442595 to your computer and use it in GitHub Desktop.
diff --git a/plugins/supported/standard_syntax.js b/plugins/supported/standard_syntax.js
--- a/plugins/supported/standard_syntax.js
+++ b/plugins/supported/standard_syntax.js
@@ -83,6 +83,9 @@
if (then.length > 1) {
newContext = then[1].split(":");
}
+ } else if (len === 0) {
+ throw new Error("StandardSyntax: Infinite loop detected: " +
+ "zero-length match that didn't change state");
} else {
nextState = fullState;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment