Esempio n. 1
0
            public void Visit(EscapeSyntax syntax)
            {
                var literalSyntax = (LiteralSyntax)syntax.Children[0];

                switch (literalSyntax.Token.Character)
                {
                case 'd':
                {
                    int           index   = GetRandomNumber('0', '9' + 1);
                    LiteralSyntax literal = new LiteralSyntax(new LiteralToken((char)index));
                    literal.Accept(this);
                }
                break;

                case 'w':
                {
                    int           index   = GetRandomNumber(0, WChars.Length);
                    LiteralSyntax literal = new LiteralSyntax(new LiteralToken(WChars[index]));
                    literal.Accept(this);
                }
                break;

                case 's':
                case 'W':
                case 'D':
                    throw new NotSupportedException();

                default:
                    literalSyntax.Accept(this);
                    break;
                }
            }
Esempio n. 2
0
 public void Visit(EscapeSyntax syntax)
 {
     throw new NotImplementedException();
 }