ZoneCodeGenerator: Fix | not being a recognized token of the lexer

This commit is contained in:
Jan 2019-11-19 12:54:13 +01:00
parent 2215fef883
commit 8d4e4c0025
2 changed files with 4 additions and 1 deletions

View File

@ -35,7 +35,8 @@ namespace ZoneCodeGenerator.Parsing.Impl
'+',
'-',
'/',
'\\'
'\\',
'|'
};
private readonly IParsingFileStream fileStream;

View File

@ -65,6 +65,7 @@ namespace ZoneCodeGeneratorTests.Parsing.Impl
"word1-word2- word3 - word4 -word5",
"word1/word2/ word3 / word4 /word5",
"word1\\word2\\ word3 \\ word4 \\word5",
"word1|word2| word3 | word4 |word5",
});
AssertTokenOutput("word1", ";", "word2", ";", "word3", ";", "word4", ";", "word5");
@ -90,6 +91,7 @@ namespace ZoneCodeGeneratorTests.Parsing.Impl
AssertTokenOutput("word1", "-", "word2", "-", "word3", "-", "word4", "-", "word5");
AssertTokenOutput("word1", "/", "word2", "/", "word3", "/", "word4", "/", "word5");
AssertTokenOutput("word1", "\\", "word2", "\\", "word3", "\\", "word4", "\\", "word5");
AssertTokenOutput("word1", "|", "word2", "|", "word3", "|", "word4", "|", "word5");
Assert.IsTrue(lexer.IsEndOfStream);
}