Conversation
|
May be of interest to @pedro-w - please let me know if I've missed any syntax! |
|
Great, thank you @jneen . I can give it quick try on some other dylan files if that would help? |
|
For sure! If you have more detailed stress-test files I'd love to see them as well. |
|
I'm going to merge this for now, @pedro-w please let me know if you have more dylan code to test against. |
|
Sorry, it took me a while to remember how to work ruby and then build rouge from github !! It looks great apart from handling backslash - it's used to escape names that might be reserved words or operators. From the DRM Is that trivial for you to add? - please say if not and I will roll up my sleeves and send a PR, might take a while... Thanks! |
|
Can you provide some sample code that uses this? |
|
Sure, define inline method collector-protocol
(class :: subclass(<number>), #key from = 0, by = \+)
=> (new-collector :: <box>,
add-first :: <function>,
add-last :: <function>,
add-sequence-first :: <function>,
add-sequence-last :: <function>,
collection :: <function>)
values(box(from),
method (collector, value)
collector.object := by(value, collector.object);
end,
method (collector, value)
collector.object := by(collector.object, value);
end,
sequence-collection-not-yet-implemented,
sequence-collection-not-yet-implemented,
method (collector)
collector.object
end)
end method;In the part |
Extends and supersedes #1706.
Fixes #25.
Changes made:
=>parsed as two separate tokens previously)