* mem and obj modules are roughly divided between doing memory-specific
things and object-specific things
* Box::new_uninit() is a nightly feature and it's quite useful, so I'm
enabling that for now
* Check out src/obj/attrs.rs for possible undefined behavior in the
Attrs::new() function. I'm sure it'll be just fine.
Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
* Comment and whitespace skipping is now handed by a regex
* Remove skip_whitespace and adv_char since they aren't used anymore
* Fix pos_text() to return a reference with the correct lifetime
* Add comment skipping tests
Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
Assign statements and standalone expression statements are added, plus
some tests.
Additionally, starting tokens are implemented using lazy_static!{} so
that they can be mixed and matched.
Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
To distinguish between objects and code bodies, an object is delimited
by curly braces, prefixed with a percent sign. Ex:
obj = %{
key = value
}
Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
* Lexer recognizes semicolons as EOL tokens, and newline tokens
* Parser can be configured to ignore newlines (which is also used
internally)
* Newlines are allowed in lists, tuples, and parenthesized expressions
* Add a bunch of tests for the new stuff
Signed-off-by: Alek Ratzloff <alekratz@gmail.com>