Skip to content

Instantly share code, notes, and snippets.

@mneedham
Created December 23, 2009 23:02
Show Gist options
  • Save mneedham/262877 to your computer and use it in GitHub Desktop.
Save mneedham/262877 to your computer and use it in GitHub Desktop.
def parse
expr = assert_expr :expr
assert_done
expr
end
def assert_expr(name)
(e = send(name)) && (return e)
raise Sass::SyntaxError.new("Expected expression, was #{@lexer.done? ? 'end of text' : "#{@lexer.peek.type} token"}.")
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment