
How can I make sure an ast node coming from a non-default tree constructor has offsets that include non-terminal keywords when said keywords are otherwise discarded?
For example, this is one of the alternations for a statement production:
statement.Production = @doKeyword + block["block"] + @endKeyword > Ast<ExplicitBlockStatement>().SetProperty(ebs => ebs.ExplicitBlock, AstFrom("block"))
The do and end keywords don't matter for the ExplicitBlockStatement node, but I need the node's offsets to encompass their source characters for comparison purposes later.
Similarly, I have the same question for non-built-in tree constructors, like in this production:
statement.Production = @functionKeyword + functionName["funcName"] + functionBody["funcBody"] > new FuncDefStatTreeNodeConstructor()
Thanks in advance.