v0.2.0
Lots of updates since the last release 2 weeks ago, so I felt like it was time for another tag.
- I updated the codebase to try to enforce a little consistency in the function naming. Basically each struct should have an
_alloc
,_init
, and_free
variant. By separating out_alloc
and_init
it makes it a little more clear what's going on when some structs can be either nested or living on their own. - I tried to simplify the config a bit to make it more maintainable going forward. The list of nodes is growing and it's getting more difficult to read at a glance. I also added comments to all of the nodes that we have so far to hopefully better communicate what they each mean semantically.
- I've added tokens that can be optional on nodes, which means we now have a
YP_TOKEN_NOT_PROVIDED
. This token type is meant to indicate that a token could be here but wasn't found in the source and it's not an error (think parentheses on method calls). - I added some code to walk the tree in C and prettyprint the nodes/tokens/strings. It makes it much easier to debug what's going on when developing.
- We're now using
rake
to handle everything, which makes for a much streamlined development experience. Thanks @tenderlove! - We now correctly parse superclasses, after fixing a binding power issue.
- I started work on encodings. We have ASCII and UTF-8 baked in now. I'm not 100% sure if this is the way I actually want to go, but it works for now. Lots more experimentation needed on this.
Now for the new nodes:
BreakNode
,NextNode
,SuperNode
,YieldNode
ForwardingSuperNode
StringListNode
,StringNode
,InterpolatedStringNode
,StringInterpolatedNode
ConstantPathWriteNode
RangeNode
DefinedNode
ElseNode
DefNode
RequiredParameterNode
,OptionalParameterNode
,KeywordParameterNode
And a couple of changes:
CharacterLiteralNode
no longer exists, as it's just aStringNode
.CallNode
now works for methods with?
and!
, operators of::
, and the.()
shorthandCallNode
now tracks its parentheses