Ico Doornekamp

Results 246 comments of Ico Doornekamp

This already works: ``` C1[T] = ref object of RootObj fn: proc(c: C1[T]): C1[T] val: T proc magic1[T](c: C1[T], v: T) {.cpsMagic.} = #

> My question is multi-fold: 1) given your statement above that code > gets executed even in dead-end parsing is there any API for knowing > this and possibly allowing...

> I will work on putting together a small example for you, but I have a > 95% done grammar here: > https://gist.github.com/reverendpaco/fc64863d15539349e856a5e1883b73df That's a pretty impressive grammar. > I...

Quoting reverendpaco (2020-04-04 22:46:30) > > I have been struggling with this as I've learned Nim. Haven't we all. Sometimes I get lost and try to do all kind of...

Is there anything I can do to help you out with this, still?

Closing this, feel free to reopen if it's still relevant.

Yeah, this is one of my nitpicks as well. I usually solve this with always-match rules in the grammar like so: ``` foo

Quoting Varriount (2019-12-03 15:59:48) > - Rather than expose parser state as multiple variables, expose it as > a single variable. This would be consistent with how the capture data...

> What about passing in the parser state and capture object as > parameters, and marking the function as both inline and giving it a > regular calling convention? Seems...

> I suggest to use the return of the code block to pass a parsed value to the upper rule/capture. Do you mean when captures are nested? Because apart from...