Annotation: Add to pass-through expressions and add proper is-checks.

Also make the default implementations not return null and this.
M src/main/java/nl/grauw/glass/SourceBuilder.java +1 -2
@@ 20,7 20,6 @@ import nl.grauw.glass.directives.Proc;
 import nl.grauw.glass.directives.Rept;
 import nl.grauw.glass.directives.Section;
 import nl.grauw.glass.directives.Terminator;
-import nl.grauw.glass.expressions.Annotation;
 import nl.grauw.glass.expressions.Expression;
 import nl.grauw.glass.expressions.Sequence;
 import nl.grauw.glass.expressions.Type;

          
@@ 171,7 170,7 @@ public class SourceBuilder {
 	private Directive getIncludeDirective(Line line, SourceFile sourceFile) {
 		boolean once = false;
 		Expression argument = line.getArguments();
-		if (argument instanceof Annotation) {
+		if (argument.is(Type.ANNOTATION)) {
 			String annotation = argument.getAnnotation().getName();
 			if ("once".equals(annotation) || "ONCE".equals(annotation)) {
 				argument = argument.getAnnotee();

          
M src/main/java/nl/grauw/glass/expressions/Expression.java +2 -2
@@ 34,11 34,11 @@ public abstract class Expression {
 	}
 
 	public Identifier getAnnotation() {
-		return null;
+		throw new EvaluationException("Not an annotation.");
 	}
 
 	public Expression getAnnotee() {
-		return this;
+		throw new EvaluationException("Not an annotation.");
 	}
 
 	public InstructionFactory getInstruction() {

          
M src/main/java/nl/grauw/glass/expressions/Passthrough.java +10 -0
@@ 30,6 30,16 @@ public abstract class Passthrough extend
 	}
 
 	@Override
+	public Identifier getAnnotation() {
+		return resolve().getAnnotation();
+	}
+
+	@Override
+	public Expression getAnnotee() {
+		return resolve().getAnnotee();
+	}
+
+	@Override
 	public InstructionFactory getInstruction() {
 		return resolve().getInstruction();
 	}

          
M src/main/java/nl/grauw/glass/expressions/Schema.java +1 -1
@@ 80,7 80,7 @@ public class Schema implements SchemaTyp
 			this.rhsType = rhsType;
 		}
 		public boolean check(Expression argument) {
-			return argument instanceof Annotation && rhsType.check(argument.getAnnotee());
+			return argument.is(Type.ANNOTATION) && rhsType.check(argument.getAnnotee());
 		}
 	}
 

          
M src/test/java/nl/grauw/glass/expressions/ExpressionTest.java +2 -0
@@ 185,6 185,8 @@ public class ExpressionTest extends Test
 	public void testAnnotation() {
 		assertEquals("VIRTUAL", parse("VIRTUAL 15").getAnnotation().getName());
 		assertEquals(15, parse("VIRTUAL 15").getAnnotee().getInteger());
+		assertEquals("VIRTUAL", parse("(VIRTUAL 15)").getAnnotation().getName());
+		assertEquals(15, parse("(VIRTUAL 15)").getAnnotee().getInteger());
 	}
 
 	@Test