Skip to content

Instantly share code, notes, and snippets.

@xaptronic
Created October 7, 2011 14:59
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 xaptronic/1270453 to your computer and use it in GitHub Desktop.
Save xaptronic/1270453 to your computer and use it in GitHub Desktop.
Hacked my way around not being able to have obj.default() as a method call.. probably would need to add more scope around this however
--- lexer.l.orig 2011-10-07 14:48:04.000000000 +0000
+++ lexer.l 2011-10-07 14:53:36.000000000 +0000
@@ -23,7 +23,7 @@
<INITIAL>"finally" return 'FINALLY';
<INITIAL>"case" return 'CASE';
<INITIAL>"switch" return 'SWITCH';
-<INITIAL>"default" return 'DEFAULT';
+<INITIAL>[^\.]"default" { return 'DEFAULT'; }
<INITIAL>"this" return 'THIS';
<INITIAL>"with" return 'WITH';
<INITIAL>"#!"[ ]*[/].* return 'SHBANG';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment