コード例 #1
0
        public void Empty_Lexem_Is_Empty()
        {
            var lex = Lexem.Empty();

            Assert.True(lex.Type == LexemType.NotALexem);
            Assert.True(lex.Token == Token.NotAToken);
            Assert.True(lex.Content == null);
        }
コード例 #2
0
        private string GetPreprocessedContent(PreprocessingLexer pp, string code)
        {
            pp.Code = code;
            Lexem lex = Lexem.Empty();

            StringBuilder builder = new StringBuilder();

            while (lex.Type != LexemType.EndOfText)
            {
                lex = pp.NextLexem();

                builder.Append(lex.Content);
            }
            return(builder.ToString().Trim());
        }
コード例 #3
0
 public override Lexem ReadNextLexem(SourceCodeIterator iterator)
 {
     return(Lexem.Empty());
 }