| Index: lib/compiler/implementation/tree/nodes.dart
|
| diff --git a/lib/compiler/implementation/tree/nodes.dart b/lib/compiler/implementation/tree/nodes.dart
|
| index 72467acf9edb737f639d35ab13a9a95ef5871f0a..c31df5a2a4c1d9d279d96eb42fc74cbecb2bcb78 100644
|
| --- a/lib/compiler/implementation/tree/nodes.dart
|
| +++ b/lib/compiler/implementation/tree/nodes.dart
|
| @@ -1171,6 +1171,17 @@ class Modifiers extends Node {
|
| }
|
| return flags;
|
| }
|
| +
|
| + Node findModifier(String modifier) {
|
| + Link<Node> nodeList = nodes.nodes;
|
| + for (; !nodeList.isEmpty(); nodeList = nodeList.tail) {
|
| + String value = nodeList.head.asIdentifier().source.stringValue;
|
| + if(value === modifier) {
|
| + return nodeList.head;
|
| + }
|
| + }
|
| + return null;
|
| + }
|
|
|
| Modifiers asModifiers() => this;
|
| Token getBeginToken() => nodes.getBeginToken();
|
| @@ -1186,6 +1197,8 @@ class Modifiers extends Node {
|
| bool isFactory() => (flags & FLAG_FACTORY) != 0;
|
| bool isExternal() => (flags & FLAG_EXTERNAL) != 0;
|
|
|
| + Node getStatic() => findModifier('static');
|
| +
|
| /**
|
| * Use this to check if the declaration is either explicitly or implicitly
|
| * final.
|
|
|