Example #1
0
 public override Expr Nud()
 {
     int size = SizeSpecifier(Text);
     Tokenizer.Advance("[");
     Expr indexExpr = ParseExpression(Tokenizer, 13);
     Tokenizer.Advance("]");
     MemoryAccessExpr mem = new MemoryAccessExpr(this, size, indexExpr);
     if (Tokenizer.Current.Text == "[")
     {
         Tokenizer.Advance("[");
         mem.IndexExpr2 = ParseExpression(Tokenizer, 13);
         Tokenizer.Advance("]");
     }
     return mem;
 }
Example #2
0
 public void Visit(MemoryAccessExpr e)
 {
     throw new ParseException("Memory access not allowed in constant expression", e.Token);
 }