Skip to content

Instantly share code, notes, and snippets.

View edloidas's full-sized avatar
😎
Creating beautiful things.

Mikita Taukachou edloidas

😎
Creating beautiful things.
View GitHub Profile
@Zirak
Zirak / gist:1761880
Created February 7, 2012 20:52
A parser for DnD dice rolls
//infix operator-precedence parser
//also supports a d operator - a dice roll
var parsePrecedence = (function () {
//we don't care about whitespace. well, most whitespace
var whitespace = {
' ' : true,
'\t' : true
};