Commit Graph

6 Commits

Author SHA1 Message Date
Yorick Peterse d5002010fe Removed RSpec shared examples. 2014-11-10 00:06:26 +01:00
Yorick Peterse 1f3b4cb2fb Added initial CSS evaluation tests. 2014-11-04 23:34:01 +01:00
Yorick Peterse 580856dcf7 Cleaned up XPath specs using a shared example. 2014-07-15 09:34:11 +02:00
Yorick Peterse 114bc0d6e8 Upgrade to RSpec 3.0.
For this I've enabled both the old expectation and stubbing/mocking syntax. The
old syntax is much more compact and to me reads nicer. For example, consider
the following:

    lex('<foo></foo>').should == [...]

To me this reads much nicer than this:

    expect(lex('<foo></foo>')).to eq([...])
2014-06-02 12:09:38 +02:00
Yorick Peterse 629dcd3fe6 Support for IO inputs in the lexer.
Using IO/StringIO objects one can parse large XML files without first having to
read the entire file into memory. This can potentially save a lot of memory at
the cost of a slightly slower runtime.

For IO like instances the lexer will consume the input line by line. If a
String is given it's consumed as a whole instead. A small side effect of
reading the input line by line is that text such as "foo\nbar" will be lexed as
two tokens instead of one.

Fixes #19.
2014-05-26 00:30:39 +02:00
Yorick Peterse 702477ca28 Basic project layout. 2014-02-26 19:50:16 +01:00