Skip to content

Instantly share code, notes, and snippets.

@0x0dea
Created February 17, 2016 04:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 0x0dea/e5e71cbe208a1f5decfa to your computer and use it in GitHub Desktop.
Save 0x0dea/e5e71cbe208a1f5decfa to your computer and use it in GitHub Desktop.
diff --git a/parse.y b/parse.y
index 49833e0..b0c52c1 100644
--- a/parse.y
+++ b/parse.y
@@ -7983,6 +7983,13 @@ parse_ident(struct parser_params *parser, int c, int cmd_state)
else {
pushback(c);
}
+ c = nextc();
+ if ((c == '!' || c == '?') && c != toklast()) {
+ tokadd(c);
+ }
+ else {
+ pushback(c);
+ }
tokfix();
if (toklast() == '!' || toklast() == '?') {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment