-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Labels
bugSomething isn't workingSomething isn't working
Description
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
[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.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working