Tim Blasi decdbea7d7 fix(dart/transformer): Correctly handle const object annotations
Previously, annotations which were const objects (as opposed to const
instance creation expressions) were incorrectly output as instance
creation expressions.

Before:
```
const override() // A const instance creation expression
```

After
```
override // A const instance
```

Closes #4481
2015-10-03 00:27:52 +00:00

41 lines
1.2 KiB
Protocol Buffer

syntax = "proto2";
package angular2.src.transform.common.model.proto;
message NamedParameter {
required string name = 1;
required string value = 2;
}
message AnnotationModel {
// The constructor that creates the annotation, or the name of the field that
// defines the annotation.
required string name = 1;
// The positional parameters provided to the annotation.
repeated string parameters = 2;
// The named parameters provided to the annotation.
repeated NamedParameter named_parameters = 3;
// Whether this is a `View` annotation.
optional bool is_view = 4;
// Whether this is a `Directive` annotation. This takes inheritance into
// account, that is, this should be true if `is_component` is true.
optional bool is_directive = 5;
// Whether this is a `Component` annotation.
optional bool is_component = 6;
// Whether this is an `Injectable` annotation. This takes inheritance into
// account, that is, this should be true if `is_directive` and/or
// `is_component` is true.
optional bool is_injectable = 7;
// Whether this annotation is a constant object (for example, `@override`) as
// opposed to a const instance creation expression
// (for example, `@Injectable()`).
optional bool is_const_object = 8;
}