Skip to content

Instantly share code, notes, and snippets.

@nickpoorman
Created September 13, 2012 18:50
Show Gist options
  • Save nickpoorman/3716673 to your computer and use it in GitHub Desktop.
Save nickpoorman/3716673 to your computer and use it in GitHub Desktop.
refactor bens function
Lexer: function(line) {
var lex = {
origLine: line,
line: line,
yytext: null,
token: null,
check: function(tok) {
if(tok == this.token) {
return this.yytext;
}
}
END: "$",
LIT = "L",
ID = "I"
}
return lex
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment