Open kant2002 opened 1 year ago
Describe the bug I try to declare language which is somewhat whitespace sensetive. For now I need only empty line as separator, definitions below.
public enum EngLangTokenType { [Error] Error, [End] End, [Ignore] [Regex("([ \t]+((\r\n|\n|\r)[ \t]*)?|(\r\n|\n|\r))")] Whitespace, [Regex("(\r\n|\n|\r){2,}")] Multiline, }
And now I'm in situation where that Multiline separator can be missing in the end of file, which lead to fact that some statements may go missing.I did try to do following
Multiline
[Rule("paragraph : statement_list Multiline+")] private static BlockStatement MakeParagraph( BlockStatement statement, IReadOnlyList<IToken<EngLangTokenType>> paragraphToken) => statement; [Rule("paragraph : statement_list End")] private static BlockStatement MakeParagraph( BlockStatement statement, IToken<EngLangTokenType> paragraphToken) => statement;
but if I add this rule, I have infinite bug. So I would like to hear what I can do about that.
Describe the bug I try to declare language which is somewhat whitespace sensetive. For now I need only empty line as separator, definitions below.
And now I'm in situation where that
Multiline
separator can be missing in the end of file, which lead to fact that some statements may go missing.I did try to do followingbut if I add this rule, I have infinite bug. So I would like to hear what I can do about that.